-
-
Notifications
You must be signed in to change notification settings - Fork 382
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
accept Into<IVec> for Tree operations that provide new values #627
Conversation
Hum... It does seem that it will not pass the tests if you do not add a type annotation. |
By the way, don't you think it could be "better" to bump to 0.21.5 once #626 is merged? |
versions are cheap! |
but, now that I realized there's some breakage possibility, I'll bump to 0.22 |
) -> Result<std::result::Result<(), Option<IVec>>> | ||
where | ||
K: AsRef<[u8]>, | ||
IVec: From<V>, | ||
OV: AsRef<[u8]>, | ||
IVec: From<NV>, |
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.
Why not NV: Into<IVec>
? Just asking, no offense.
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.
because then below we can't use IVec::from(v), which is cleaner IMO than v.into() or turbofishing it
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.
Yeah, I agree!
) -> Result<std::result::Result<(), Option<IVec>>> | ||
where | ||
K: AsRef<[u8]>, | ||
OV: AsRef<[u8]>, |
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.
Don't you remenber that it was not possible the last time I tried? 😄
I do not think that the Rust language team changed that inference behavior, sadly...
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.
Ok, we will keep these lacks of inference. I prefer that, it is more generic!
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.
cas is already sort of a rare codepath and today I'm preferring genericism
No description provided.