Skip to content
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

Merged
merged 6 commits into from
Jul 7, 2018
Merged

a few more 0.7 updates #672

merged 6 commits into from
Jul 7, 2018

Conversation

stevengj
Copy link
Member

@stevengj stevengj commented Jul 6, 2018

continuing #671

Copy link
Member

@fredrikekre fredrikekre left a 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))
Copy link
Member

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))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Compat.?

Copy link
Member Author

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.

Copy link
Member Author

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))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Compat.?

@stevengj
Copy link
Member Author

stevengj commented Jul 6, 2018

Looks like the Travis failure is unrelated

@stevengj stevengj merged commit 757ff17 into master Jul 7, 2018
@stevengj stevengj deleted the moreupdates branch July 7, 2018 18:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants