-
Notifications
You must be signed in to change notification settings - Fork 700
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
Add default serializer for SelectionModifier in FindNext and FindPrevious #741
Conversation
(maybe I'm misunderstanding the problem?) |
Right! I changed it now for the |
@scholtzan this needs a rebase as well. |
@cmyr Done |
rust/core-lib/src/view.rs
Outdated
self.find_next(text, false, wrap_around.unwrap_or(false), | ||
allow_same.unwrap_or(false), | ||
&modify_selection.unwrap_or(SelectionModifier::Set)), | ||
self.find_next(text, false, wrap_around, allow_same, &modify_selection), |
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.
Ah I actually have one more nit while we're in here; by convention, we preface the names of functions that are directly handling RPCs with do_
, so this should be do_find_next
, and below should be do_selection_for_find
, etc.
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.
Done
Great, thanks for the cleanup! |
This is a followup PR for #704. I am not sure if it would make sense to have default serializers for
wrap_around
andallow_same
too?Currently, serde does not support default literals such as
false
(serde-rs/serde#368) so it would be necessary to write some workaround with functions.