Skip to content

Commit 20f8538

Browse files
committed
simplify if let Some(_) = x to if x.is_some() (clippy::redundant_pattern_matching)
1 parent c37e198 commit 20f8538

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compiler/rustc_infer/src/infer/error_reporting/nice_region_error/different_lifetimes.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ impl<'a, 'tcx> NiceRegionError<'a, 'tcx> {
121121

122122
(Some(ret_span), _) => {
123123
let sup_future = self.future_return_type(scope_def_id_sup);
124-
let (return_type, action) = if let Some(_) = sup_future {
124+
let (return_type, action) = if sup_future.is_some() {
125125
("returned future", "held across an await point")
126126
} else {
127127
("return type", "returned")
@@ -140,7 +140,7 @@ impl<'a, 'tcx> NiceRegionError<'a, 'tcx> {
140140
}
141141
(_, Some(ret_span)) => {
142142
let sub_future = self.future_return_type(scope_def_id_sub);
143-
let (return_type, action) = if let Some(_) = sub_future {
143+
let (return_type, action) = if sub_future.is_some() {
144144
("returned future", "held across an await point")
145145
} else {
146146
("return type", "returned")

0 commit comments

Comments
 (0)