Skip to content

Commit 80ce4bf

Browse files
committed
Fixed errant return values, generic first element lookup
1 parent 981aa13 commit 80ce4bf

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

base/arrayshow.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ function show_nd(io::IO, a::AbstractArray, print_matrix::Function, show_full::Bo
272272
nd = ndims(a)-2
273273
show_full || print(io, "[")
274274
Is = CartesianIndices(tailinds)
275-
lastidxs = Is[1].I
275+
lastidxs = first(Is).I
276276
for I in Is
277277
idxs = I.I
278278
if limit
@@ -320,6 +320,7 @@ function show_nd(io::IO, a::AbstractArray, print_matrix::Function, show_full::Bo
320320
lastidxs = idxs
321321
end
322322
show_full || print(io, "]")
323+
()
323324
end
324325

325326
# print_array: main helper functions for show(io, text/plain, array)
@@ -423,6 +424,7 @@ function _show_nonempty(io::IO, X::AbstractMatrix, prefix::String, drop_brackets
423424
last(rr) != nr && rdots && print(io, "\u2026 ; ")
424425
end
425426
drop_brackets || print(io, "]")
427+
()
426428
end
427429

428430

0 commit comments

Comments
 (0)