Implement ignore function on Result. Fixes #20949#21101
Implement ignore function on Result. Fixes #20949#21101sixohsix wants to merge 1 commit intorust-lang:masterfrom
Conversation
|
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @alexcrichton (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. The way Github handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see CONTRIBUTING.md for more information. |
|
Thanks for the PR! At this time we're focusing on stabilizing what we currently have in the standard library for the upcoming 1.0 release, and for now we're trying to cut back on various APIs throughout the libraries. In the future we're likely going to require an RFC for new APIs, especially those on core types like At this time I don't think that there's a wide enough consensus that we want this function, and adding it is certainly backwards compatible! If you'd like to pursue this, I'd recommend opening a discussion thread on discuss.rust-lang.org or perhaps an RFC to canvas other opinions on whether we should add this method. For now though I'm going to close this, but thanks again for investigating it! |
I decided to implement a fix for #20949, which adds a
.ignorefunction toResult, because it seemed easy and fun to do. However, I'm I'll defer to Rust core devs to decide if they even want this feature. If you don't want this feature, no problem, just close the PR.This is my first pull request, so please review mercilessly, and let me know if I should change anything.