-
-
Notifications
You must be signed in to change notification settings - Fork 183
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
Remove get for getters & properties where applicable #296
Remove get for getters & properties where applicable #296
Conversation
38cc0b5
to
4c0acc2
Compare
@@ -80,7 +80,7 @@ impl WidgetImpl for CustomButton {} | |||
// Trait shared by all buttons | |||
impl ButtonImpl for CustomButton { | |||
fn clicked(&self, button: &Self::Type) { | |||
let incremented_number = self.number.borrow().clone() + 1; | |||
let incremented_number = *self.number.borrow() + 1; |
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.
Interesting, we should run clippy for the book listings as well
cc @Hofer-Julian
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.
Good idea!
Do you want to open a PR or issue for that?
4c0acc2
to
c7b5bdd
Compare
Will force push again shortly, just noticed that Edit: done. |
c7b5bdd
to
181376c
Compare
181376c
to
096fc4a
Compare
Note to application developers
Applications developers should use
fix-getters-calls
to ease migration of their applications. If you also wish to change your get functions definition to comply with the standards implemented here, usefix-getters-def
.Object
This is the continuation of gtk-rs/gir#1021 and gtk-rs/gtk3-rs#211 as an attempt to address gtk-rs/gir#963.
This one uses the
fix-getters
tools, which should ease migration for applications developers. Note however, that some moreget
functions might be renamed due to the conservative approach of these tools.I used the same conflict resolutions that I used for
gtk-rs
where applicable. Please take a look at the first commit ("gir prerp. for regen..."). If we decide to change some of these conflict resolutions, I'll updategtk-rs
too.@bilelmoussaoui: with @sdroege, we planned to perform a second pass on
gtk-rs
,gtk4-rs
andgstreamer-rs
to address a couple of edge cases related toenum
generation and subclassing (similar to the discussion we had in your PR). See https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/issues/325. The idea is to get the big chunk in shortly and proceed with these details in the coming days.