This commit is contained in:
Erin 2022-08-18 14:58:46 +02:00 committed by ondra05
parent 5d81e6288f
commit be293f6528

View file

@ -221,15 +221,7 @@ impl<'a, I: BootlegRead> Interpreter<'a, I> {
};
Some((*counter, index))
})
.find_map(
|(counter, index)| {
if counter == 0 {
Some(index)
} else {
None
}
},
)
.find_map(|(counter, index)| (counter == 0).then_some(index))
}
fn get_matching_opening_bracket(&mut self, closing: usize) -> Option<usize> {
@ -245,15 +237,7 @@ impl<'a, I: BootlegRead> Interpreter<'a, I> {
};
Some((*counter, index))
})
.find_map(
|(counter, index)| {
if counter == 0 {
Some(index)
} else {
None
}
},
)
.find_map(|(counter, index)| (counter == 0).then_some(index))
}
}