-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Change result::map to consume the result #5840
Conversation
This fixes the pretty printer from printing the obsolete syntax `pub impl...for...`.
Just rebased this onto HEAD, and added a minor fix to the deriving code that fixes the visibility to be inherited instead of public on the impls. |
Could you copy the naming conventions from |
@thestinger: I'd rather it be the other way around. I expect (without proof) that most uses of |
@erickt: that would be fine ( |
+1 to |
Let's do this for vectors too. |
@brson: I think the |
+1 but it needs rebasing again :( |
@brson: I was just about to submit an RFC to ask if we should change all the |
Another option is to follow the style of |
fwiw I'm not all that fond of |
Yeah, |
@graydon: I thought about getting rid of the
Only requires one copy, whereas with
I'd like to keep this optimization available. How about naming functions that share this pattern something like |
ah! good point. yes. I am not sure what the fate of the term "copy" is in the world of "clone", but either term is fine by me. Consistency with whatever else is going on in clone-vs-copy terminology seems best to me. |
Another option: Downside: But i think i'd prefer |
The method that's actually on vectors should just consume them and remove the elements in-place. There's a generic filter function in the |
Needs rebasing yet again... |
Closing old PRs. Reopen or file a new one if you have time to rebase it :-) |
Basic instruction for new contributors While answering a few questions to @AB1908, I realized, that our documentation could use some love. Especially the "Getting Started" part for new contributors. So I wrote together some instruction on how to get the toolchain and how to build and test Clippy. [Rendered](https://github.com/flip1995/rust-clippy/blob/basics/doc/basics.md) r? @phansch changelog: none
This changes
result::map
to use moves instead of copies to transform one result into another. This makes the function usable when result is wrapping uncopyable values.Also, it includes a minor cleanup of serialize.rs.