Skip to content
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

Add try_filter_map_results method. #2

Open
wants to merge 4 commits into
base: feature/try_map_results
Choose a base branch
from

Conversation

gin-ahirsch
Copy link

You may wanna hold off merging this until rust-itertools#377 (comment) (compatibility with Rust 1.24) is resolved. This commit also uses {Option,Result}::transpose(), which is not available in that version.

@gin-ahirsch
Copy link
Author

After actually using this, while conceptually I think it makes more sense to have the closure return a Option<Result>, it's inconvenient that the try-operator ? does not work in the closure. Thus I changed it to expect the return-type Result<Option> instead.

Also remove calls to Result::transpose() to stay compatible to Rust
1.24.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants