diff options
| author | bors <bors@rust-lang.org> | 2021-12-19 09:31:37 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-12-19 09:31:37 +0000 |
| commit | 879eccead7d022b538895a9b93a1237ddbefccbd (patch) | |
| tree | bb6c606e0022f5a955853b85bb53ff3a5020a24f /clippy_lints/src/strings.rs | |
| parent | af1eea3f0a43f7eee0866b734a635a960ee74ad1 (diff) | |
| parent | a83c935a18ebd996fabe91af758353d208090e88 (diff) | |
| download | rust-879eccead7d022b538895a9b93a1237ddbefccbd.tar.gz rust-879eccead7d022b538895a9b93a1237ddbefccbd.zip | |
Auto merge of #91957 - nnethercote:rm-SymbolStr, r=oli-obk
Remove `SymbolStr` This was originally proposed in https://github.com/rust-lang/rust/pull/74554#discussion_r466203544. As well as removing the icky `SymbolStr` type, it allows the removal of a lot of `&` and `*` occurrences. Best reviewed one commit at a time. r? `@oli-obk`
Diffstat (limited to 'clippy_lints/src/strings.rs')
| -rw-r--r-- | clippy_lints/src/strings.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clippy_lints/src/strings.rs b/clippy_lints/src/strings.rs index 73600a8a087..ad8e72ad764 100644 --- a/clippy_lints/src/strings.rs +++ b/clippy_lints/src/strings.rs @@ -327,7 +327,7 @@ impl<'tcx> LateLintPass<'tcx> for StringLitAsBytes { if let ExprKind::MethodCall(path, _, [recv], _) = &e.kind; if path.ident.name == sym!(into_bytes); if let ExprKind::MethodCall(path, _, [recv], _) = &recv.kind; - if matches!(&*path.ident.name.as_str(), "to_owned" | "to_string"); + if matches!(path.ident.name.as_str(), "to_owned" | "to_string"); if let ExprKind::Lit(lit) = &recv.kind; if let LitKind::Str(lit_content, _) = &lit.node; |
