Simplify some pattern-matches (#16402)
When those match an exact combinator on Option / Result. Tool-aided by [comby-rust](https://github.com/huitseeker/comby-rust).
This commit is contained in:
committed by
GitHub
parent
bb9d2fd07a
commit
b08cff9e77
@ -1661,10 +1661,11 @@ fn main() {
|
||||
let parse_results = {
|
||||
if let Some(slot_string) = frozen_regex.captures_iter(&line).next() {
|
||||
Some((slot_string, &mut frozen))
|
||||
} else if let Some(slot_string) = full_regex.captures_iter(&line).next() {
|
||||
Some((slot_string, &mut full))
|
||||
} else {
|
||||
None
|
||||
full_regex
|
||||
.captures_iter(&line)
|
||||
.next()
|
||||
.map(|slot_string| (slot_string, &mut full))
|
||||
}
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user