Skip to content

Commit

Permalink
Fix depwarn message for findnext, findprev (#24139)
Browse files Browse the repository at this point in the history
  • Loading branch information
GregPlowman authored and ararslan committed Oct 15, 2017
1 parent f9c662d commit b76c0fa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions base/array.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1610,7 +1610,7 @@ function findnext(A, start::Integer)
while i <= l
a = A[i]
if !warned && !(a isa Bool)
depwarn("In the future `findnext` will only work on boolean collections. Use `findnext(x->x!=0, A)` instead.", :findnext)
depwarn("In the future `findnext` will only work on boolean collections. Use `findnext(x->x!=0, A, start)` instead.", :findnext)
warned = true
end
if a != 0
Expand Down Expand Up @@ -1725,7 +1725,7 @@ function findprev(A, start::Integer)
while i >= 1
a = A[i]
if !warned && !(a isa Bool)
depwarn("In the future `findprev` will only work on boolean collections. Use `findprev(x->x!=0, A)` instead.", :findprev)
depwarn("In the future `findprev` will only work on boolean collections. Use `findprev(x->x!=0, A, start)` instead.", :findprev)
warned = true
end
a != 0 && return i
Expand Down

0 comments on commit b76c0fa

Please sign in to comment.