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
|
@ -273,7 +273,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
|
|||
if !generic_args.parenthesized && !has_lifetimes {
|
||||
generic_args.args = self
|
||||
.elided_path_lifetimes(
|
||||
first_generic_span.map(|s| s.shrink_to_lo()).unwrap_or(segment.ident.span),
|
||||
first_generic_span.map_or(segment.ident.span, |s| s.shrink_to_lo()),
|
||||
expected_lifetimes,
|
||||
)
|
||||
.map(GenericArg::Lifetime)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue