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
|
@ -952,7 +952,7 @@ fn is_useful<'p, 'tcx>(
|
|||
assert!(rows.iter().all(|r| r.len() == v.len()));
|
||||
|
||||
// FIXME(Nadrieril): Hack to work around type normalization issues (see #72476).
|
||||
let ty = matrix.heads().next().map(|r| r.ty).unwrap_or(v.head().ty);
|
||||
let ty = matrix.heads().next().map_or(v.head().ty, |r| r.ty);
|
||||
let pcx = PatCtxt { cx, ty, span: v.head().span, is_top_level };
|
||||
|
||||
debug!("is_useful_expand_first_col: ty={:#?}, expanding {:#?}", pcx.ty, v.head());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue