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/methods/str_splitn.rs | |
| parent | af1eea3f0a43f7eee0866b734a635a960ee74ad1 (diff) | |
| parent | a83c935a18ebd996fabe91af758353d208090e88 (diff) | |
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/methods/str_splitn.rs')
| -rw-r--r-- | clippy_lints/src/methods/str_splitn.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clippy_lints/src/methods/str_splitn.rs b/clippy_lints/src/methods/str_splitn.rs index e5fafdb075c..70f20da1d6d 100644 --- a/clippy_lints/src/methods/str_splitn.rs +++ b/clippy_lints/src/methods/str_splitn.rs @@ -140,7 +140,7 @@ fn parse_iter_usage( let did = cx.typeck_results().type_dependent_def_id(e.hir_id)?; let iter_id = cx.tcx.get_diagnostic_item(sym::Iterator)?; - match (&*name.ident.as_str(), args) { + match (name.ident.as_str(), args) { ("next", []) if cx.tcx.trait_of_item(did) == Some(iter_id) => { if reverse { (IterUsageKind::Second, e.span) @@ -298,7 +298,7 @@ fn check_iter( if let Some(did) = cx.typeck_results().type_dependent_def_id(e.hir_id); if let Some(iter_id) = cx.tcx.get_diagnostic_item(sym::Iterator); then { - match (&*name.ident.as_str(), args) { + match (name.ident.as_str(), args) { ("next", []) if cx.tcx.trait_of_item(did) == Some(iter_id) => { return true; }, |
