-
-
Notifications
You must be signed in to change notification settings - Fork 415
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
a few more 0.7 updates #672
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps those Compat.find*
does not matter if we are sure to find a match?
src/IJulia.jl
Outdated
@@ -273,7 +273,8 @@ push_postexecute_hook(f::Function) = push!(postexecute_hooks, f) | |||
Remove a function `f()` from the list of functions to | |||
execute after executing any notebook cell. | |||
""" | |||
pop_postexecute_hook(f::Function) = splice!(postexecute_hooks, findfirst(equalto(f), postexecute_hooks)) | |||
pop_postexecute_hook(f::Function) = | |||
splice!(postexecute_hooks, findlast(isequal(f), postexecute_hooks)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Compat.
?
src/IJulia.jl
Outdated
@@ -289,7 +290,8 @@ push_preexecute_hook(f::Function) = push!(preexecute_hooks, f) | |||
Remove a function `f()` from the list of functions to | |||
execute before executing any notebook cell. | |||
""" | |||
pop_preexecute_hook(f::Function) = splice!(preexecute_hooks, findfirst(equalto(f), preexecute_hooks)) | |||
pop_preexecute_hook(f::Function) = | |||
splice!(preexecute_hooks, findlast(isequal(f), preexecute_hooks)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Compat.
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn’t need it. If f isn’t found, whether findlast returns 0 or nothing splice! will throw.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(But I guess it wouldn't hurt to make sure it throws the same exception on 0.6 and 0.7.)
src/IJulia.jl
Outdated
@@ -306,7 +308,8 @@ push_posterror_hook(f::Function) = push!(posterror_hooks, f) | |||
Remove a function `f()` from the list of functions to | |||
execute after an error occurs when a notebook cell is evaluated. | |||
""" | |||
pop_posterror_hook(f::Function) = splice!(posterror_hooks, findfirst(equalto(f), posterror_hooks)) | |||
pop_posterror_hook(f::Function) = | |||
splice!(posterror_hooks, findlast(isequal(f), posterror_hooks)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Compat.
?
Looks like the Travis failure is unrelated |
continuing #671