From 42c451c122be4a1017780c08ff14eee430036029 Mon Sep 17 00:00:00 2001 From: Oliver Schneider Date: Wed, 1 Feb 2017 09:21:14 +0100 Subject: [PATCH] update help message to match the suggestion --- clippy_lints/src/loops.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clippy_lints/src/loops.rs b/clippy_lints/src/loops.rs index c0fb3b63ea9f..daddf6ea9b05 100644 --- a/clippy_lints/src/loops.rs +++ b/clippy_lints/src/loops.rs @@ -656,7 +656,7 @@ fn lint_iter_method(cx: &LateContext, args: &[Expr], arg: &Expr, method_name: &s arg.span, "it is more idiomatic to loop over references to containers instead of using explicit \ iteration methods", - "to write this more concisely, try looping over", + "to write this more concisely, try", format!("&{}{}", muta, object)) } @@ -689,7 +689,7 @@ fn check_for_loop_arg(cx: &LateContext, pat: &Pat, arg: &Expr, expr: &Expr) { arg.span, "it is more idiomatic to loop over containers instead of using explicit \ iteration methods`", - "to write this more concisely, try looping over", + "to write this more concisely, try", object.to_string()); } } else if method_name == "next" && match_trait_method(cx, arg, &paths::ITERATOR) {