diff options
| author | Max Baumann <max@bmn.dev> | 2022-03-17 19:29:59 +0100 |
|---|---|---|
| committer | Max Baumann <max@bmn.dev> | 2022-03-17 19:29:59 +0100 |
| commit | 747bb245e7cb131917e7a3828356c14a7316ca70 (patch) | |
| tree | 2b338f6b080f6116f1d41cdd41de55b7dac9b0a7 | |
| parent | 3f00f074de3f6debe594e11066864a0da1dfe4af (diff) | |
| download | rust-747bb245e7cb131917e7a3828356c14a7316ca70.tar.gz rust-747bb245e7cb131917e7a3828356c14a7316ca70.zip | |
fix: fix broken dogfood tests
| -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; |
