Skip to content

Commit 5fd6081

Browse files
committed
Fix clippy
1 parent 4a7ceea commit 5fd6081

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/tools/clippy/clippy_lints/src/needless_question_mark.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ fn is_some_or_ok_call<'a>(cx: &'a LateContext<'_>, expr: &'a Expr<'_>) -> Option
147147
if let ExprKind::Call(called, args) = &inner_expr_with_q.kind;
148148
if args.len() == 1;
149149

150-
if let ExprKind::Path(QPath::LangItem(LangItem::TryIntoResult, _)) = &called.kind;
150+
if let ExprKind::Path(QPath::LangItem(LangItem::TryTraitBranch, _)) = &called.kind;
151151
then {
152152
// Extract inner expr type from match argument generated by
153153
// question mark operator

src/tools/clippy/clippy_lints/src/try_err.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ impl<'tcx> LateLintPass<'tcx> for TryErr {
6464
if let ExprKind::Match(match_arg, _, MatchSource::TryDesugar) = expr.kind;
6565
if let ExprKind::Call(match_fun, try_args) = match_arg.kind;
6666
if let ExprKind::Path(ref match_fun_path) = match_fun.kind;
67-
if matches!(match_fun_path, QPath::LangItem(LangItem::TryIntoResult, _));
67+
if matches!(match_fun_path, QPath::LangItem(LangItem::TryTraitBranch, _));
6868
if let Some(try_arg) = try_args.get(0);
6969
if let ExprKind::Call(err_fun, err_args) = try_arg.kind;
7070
if let Some(err_arg) = err_args.get(0);

src/tools/clippy/clippy_lints/src/unused_io_amount.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ impl<'tcx> LateLintPass<'tcx> for UnusedIoAmount {
4545
if let hir::ExprKind::Call(func, args) = res.kind {
4646
if matches!(
4747
func.kind,
48-
hir::ExprKind::Path(hir::QPath::LangItem(hir::LangItem::TryIntoResult, _))
48+
hir::ExprKind::Path(hir::QPath::LangItem(hir::LangItem::TryTraitBranch, _))
4949
) {
5050
check_map_error(cx, &args[0], expr);
5151
}

0 commit comments

Comments
 (0)