Use Option::map_or instead of .map(..).unwrap_or(..)
This commit is contained in:
parent
d03fe84169
commit
a56bffb4f9
50 changed files with 67 additions and 79 deletions
|
@ -535,7 +535,7 @@ fn polymorphize<'tcx>(
|
|||
} else {
|
||||
None
|
||||
};
|
||||
let has_upvars = upvars_ty.map(|ty| ty.tuple_fields().count() > 0).unwrap_or(false);
|
||||
let has_upvars = upvars_ty.map_or(false, |ty| ty.tuple_fields().count() > 0);
|
||||
debug!("polymorphize: upvars_ty={:?} has_upvars={:?}", upvars_ty, has_upvars);
|
||||
|
||||
struct PolymorphizationFolder<'tcx> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue