diff options
| -rw-r--r-- | clippy_lints/src/use_unwrap_or.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clippy_lints/src/use_unwrap_or.rs b/clippy_lints/src/use_unwrap_or.rs index 05369000444..29bdec2cae8 100644 --- a/clippy_lints/src/use_unwrap_or.rs +++ b/clippy_lints/src/use_unwrap_or.rs @@ -41,10 +41,10 @@ impl<'tcx> LateLintPass<'tcx> for UseUnwrapOr { // look for x.or().unwrap() if_chain! { if let ExprKind::MethodCall(path, args, unwrap_span) = expr.kind; - if path.ident.name.as_str() == "unwrap"; + if path.ident.name == sym::unwrap; if let Some(caller) = args.first(); if let ExprKind::MethodCall(caller_path, caller_args, or_span) = caller.kind; - if caller_path.ident.name.as_str() == "or"; + if caller_path.ident.name == sym::or; then { let ty = cx.typeck_results().expr_ty(&caller_args[0]); // get type of x (we later check if it's Option or Result) let title; |
