Rollup merge of #79337 - LingMan:map, r=jyn514
Use Option::map instead of open coding it r? `@jonas-schievink` since you're frequently sniping these minor cleanups anyway. `@rustbot` modify labels +C-cleanup +T-compiler
This commit is contained in:
commit
064c3c146a
3 changed files with 8 additions and 12 deletions
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue