Skip to content

Commit 491aa42

Browse files
committed
Fix compatibility with Julia v1.0
Replace `eachrow` and `isnothing` as they are not in Julia v1.0.
1 parent a7375d0 commit 491aa42

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/trials.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,8 @@ function Base.show(io::IO, ::MIME"text/plain", t::Trial)
455455
end
456456

457457
print(io, "\n")
458-
for histrow in eachrow(hist)
458+
for r in axes(hist, 1)
459+
histrow = view(hist, r, :)
459460
print(io, "\n", pad, " ")
460461
for (i, bar) in enumerate(histrow)
461462
color = :default
@@ -466,7 +467,7 @@ function Base.show(io::IO, ::MIME"text/plain", t::Trial)
466467
end
467468

468469
function remtrailingzeros(timestr)
469-
if ! isnothing(match(r"\.0+$", timestr))
470+
if match(r"\.0+$", timestr) !== nothing
470471
replace(timestr, r"\.0+$" => "")
471472
else
472473
replace(timestr, r"(\.\d+?)0+$" => s"\1")

0 commit comments

Comments
 (0)