diff options
| author | Takayuki Maeda <takoyaki0316@gmail.com> | 2021-03-18 01:06:24 +0900 |
|---|---|---|
| committer | Takayuki Maeda <takoyaki0316@gmail.com> | 2021-03-18 01:06:24 +0900 |
| commit | 0edd5f881d287dcff1b7401c44c8482cbd627c6b (patch) | |
| tree | 5f14c2879ee529d3fdb1f6abda3c729bf5fb8ee2 | |
| parent | 602bcf3e4f5f540e2f81d9e807e28b35c7bee0ed (diff) | |
| download | rust-0edd5f881d287dcff1b7401c44c8482cbd627c6b.tar.gz rust-0edd5f881d287dcff1b7401c44c8482cbd627c6b.zip | |
remove the use of paths
| -rw-r--r-- | clippy_lints/src/methods/into_iter_on_ref.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clippy_lints/src/methods/into_iter_on_ref.rs b/clippy_lints/src/methods/into_iter_on_ref.rs index 5d59fa86c9e..da13b4ba37a 100644 --- a/clippy_lints/src/methods/into_iter_on_ref.rs +++ b/clippy_lints/src/methods/into_iter_on_ref.rs @@ -1,6 +1,6 @@ use clippy_utils::diagnostics::span_lint_and_sugg; +use clippy_utils::is_trait_method; use clippy_utils::ty::has_iter_method; -use clippy_utils::{match_trait_method, paths}; use if_chain::if_chain; use rustc_errors::Applicability; use rustc_hir as hir; @@ -22,7 +22,7 @@ pub(super) fn check( if_chain! { if let ty::Ref(..) = self_ty.kind(); if method_name == sym::into_iter; - if match_trait_method(cx, expr, &paths::INTO_ITERATOR); + if is_trait_method(cx, expr, sym::IntoIterator); if let Some((kind, method_name)) = ty_has_iter_method(cx, self_ty); then { span_lint_and_sugg( |
