Skip to content

Commit 27fdfd8

Browse files
committed
Fixed errant return values, generic first element lookup
1 parent 4fa3597 commit 27fdfd8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

base/arrayshow.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ function show_nd(io::IO, a::AbstractArray, print_matrix::Function, show_full::Bo
265265
nd = ndims(a)-2
266266
show_full || print(io, "[")
267267
Is = CartesianIndices(tailinds)
268-
lastidxs = Is[1].I
268+
lastidxs = first(Is).I
269269
for I in Is
270270
idxs = I.I
271271
if limit
@@ -313,6 +313,7 @@ function show_nd(io::IO, a::AbstractArray, print_matrix::Function, show_full::Bo
313313
lastidxs = idxs
314314
end
315315
show_full || print(io, "]")
316+
()
316317
end
317318

318319
# print_array: main helper functions for show(io, text/plain, array)
@@ -414,6 +415,7 @@ function _show_nonempty(io::IO, X::AbstractMatrix, prefix::String, drop_brackets
414415
last(rr) != nr && rdots && print(io, "\u2026 ; ")
415416
end
416417
drop_brackets || print(io, "]")
418+
()
417419
end
418420

419421

0 commit comments

Comments
 (0)