match_opt 
match_opt is a macro that converts a partial pattern-match into one that returns an Option
.
This can be used as a shorthand to simplify a complex pattern-match, for which only one or few cases are useful.
For example:
let some_results = vec!.map;
let some_pattern_match = some_results.filter_map;
// this is equivalent to
let alternate_pattern_match = some_results.filter_map;
This crate has no dependencies.
Documentation
The API can be found here.
Installation
Add the following line to the dependencies of your Cargo.toml
:
= "0.1.0"
Contributors
The authors of this code is François Garillot (@huitseeker).
License
This project is MIT licensed.