Skip to content

Commit 8833175

Browse files
committed
style: make expr_ty_adjusted_opt consistent with expr_ty_adjusted
1 parent 2f8eeb2 commit 8833175

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/rustc_middle/src/ty/typeck_results.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ impl<'tcx> TypeckResults<'tcx> {
383383
}
384384

385385
pub fn expr_ty_adjusted_opt(&self, expr: &hir::Expr<'_>) -> Option<Ty<'tcx>> {
386-
self.expr_adjustments(expr).last().map(|adj| adj.target).or_else(|| self.expr_ty_opt(expr))
386+
self.expr_adjustments(expr).last().map_or_else(|| self.expr_ty_opt(expr), |adj| adj.target)
387387
}
388388

389389
pub fn is_method_call(&self, expr: &hir::Expr<'_>) -> bool {

0 commit comments

Comments
 (0)