Skip to content

Commit 0edd5f8

Browse files
committed
remove the use of paths
1 parent 602bcf3 commit 0edd5f8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clippy_lints/src/methods/into_iter_on_ref.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use clippy_utils::diagnostics::span_lint_and_sugg;
2+
use clippy_utils::is_trait_method;
23
use clippy_utils::ty::has_iter_method;
3-
use clippy_utils::{match_trait_method, paths};
44
use if_chain::if_chain;
55
use rustc_errors::Applicability;
66
use rustc_hir as hir;
@@ -22,7 +22,7 @@ pub(super) fn check(
2222
if_chain! {
2323
if let ty::Ref(..) = self_ty.kind();
2424
if method_name == sym::into_iter;
25-
if match_trait_method(cx, expr, &paths::INTO_ITERATOR);
25+
if is_trait_method(cx, expr, sym::IntoIterator);
2626
if let Some((kind, method_name)) = ty_has_iter_method(cx, self_ty);
2727
then {
2828
span_lint_and_sugg(

0 commit comments

Comments
 (0)