-
Notifications
You must be signed in to change notification settings - Fork 76
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
implement support for ?Sync
callbacks
#264
Conversation
Codecov Report
@@ Coverage Diff @@
## main #264 +/- ##
==========================================
+ Coverage 86.27% 86.77% +0.50%
==========================================
Files 31 31
Lines 2478 2481 +3
==========================================
+ Hits 2138 2153 +15
+ Misses 340 328 -12
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
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.
LGTM % comments. Thanks for the patch :)
I am sorry, I missunderstood the mut thing here, could you drop commit 5800990? Then we just merge the first one. |
Why drop 5800990? |
5800990
to
2ffa136
Compare
Currently the builder method doesn't need the mut, but it would be possible (and tbh also expected) that the builder needs mut here. If we were not putting mut here, adding it would be a breaking change, so we might as well just have it there for the case that we ever need mut in a future version of the interface. I didn't realize that acquiring the lock and putting something there doesn't need mut as it uses interior mutability. So I thought we could just drop the |
It's nothing like that. This mut isn't even a part of the signature (check the docs.rs), but a part of the definition. That's because you can mutate immutable value by moving it out of the original immutable variable to the mutable one and mutate it however you want. let a = "hello".to_string();
let mut b = a;
b.push_str(" world"); |
Mhh fair point because we don't take |
Resolves #263