fix clippy::redundant_pattern_matching: use .is_some() instead of if let Some(_) = ..

This commit is contained in:
Matthias Krüger 2020-08-01 17:52:20 +02:00
parent 27bb68927d
commit 09e29e7e43

View File

@ -257,7 +257,7 @@ impl<'a, 'tcx> NiceRegionError<'a, 'tcx> {
param.param_ty.to_string(),
Applicability::MaybeIncorrect,
);
} else if let Some(_) = opaque
} else if opaque
.bounds
.iter()
.filter_map(|arg| match arg {
@ -269,6 +269,7 @@ impl<'a, 'tcx> NiceRegionError<'a, 'tcx> {
_ => None,
})
.next()
.is_some()
{
} else {
err.span_suggestion_verbose(