Skip to content

Commit 747bb24

Browse files
committed
fix: fix broken dogfood tests
1 parent 3f00f07 commit 747bb24

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clippy_lints/src/use_unwrap_or.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@ impl<'tcx> LateLintPass<'tcx> for UseUnwrapOr {
4141
// look for x.or().unwrap()
4242
if_chain! {
4343
if let ExprKind::MethodCall(path, args, unwrap_span) = expr.kind;
44-
if path.ident.name.as_str() == "unwrap";
44+
if path.ident.name == sym::unwrap;
4545
if let Some(caller) = args.first();
4646
if let ExprKind::MethodCall(caller_path, caller_args, or_span) = caller.kind;
47-
if caller_path.ident.name.as_str() == "or";
47+
if caller_path.ident.name == sym::or;
4848
then {
4949
let ty = cx.typeck_results().expr_ty(&caller_args[0]); // get type of x (we later check if it's Option or Result)
5050
let title;

0 commit comments

Comments
 (0)