1
Fork 0

Use Option::map instead of open coding it

This commit is contained in:
LingMan 2020-11-23 04:58:21 +01:00
parent c643dd2ec8
commit cd8973250d
3 changed files with 8 additions and 12 deletions

View file

@ -1106,10 +1106,7 @@ impl<T> Binder<T> {
impl<T> Binder<Option<T>> {
pub fn transpose(self) -> Option<Binder<T>> {
match self.0 {
Some(v) => Some(Binder(v)),
None => None,
}
self.0.map(Binder)
}
}