From caeb72c47bacfcc9e8be07470d682a562482f502 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Mon, 17 Aug 2015 07:30:33 +0200 Subject: [PATCH] loops: fix two trailing periods in lint msgs --- src/loops.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/loops.rs b/src/loops.rs index 092b5ce1196..064d1eb3932 100644 --- a/src/loops.rs +++ b/src/loops.rs @@ -35,12 +35,12 @@ fn check_expr(&mut self, cx: &Context, expr: &Expr) { if visitor.nonindex { span_lint(cx, NEEDLESS_RANGE_LOOP, expr.span, &format!( "the loop variable `{}` is used to index `{}`. Consider using \ - `for ({}, item) in {}.iter().enumerate()` or similar iterators.", + `for ({}, item) in {}.iter().enumerate()` or similar iterators", ident.node.name, indexed, ident.node.name, indexed)); } else { span_lint(cx, NEEDLESS_RANGE_LOOP, expr.span, &format!( "the loop variable `{}` is only used to index `{}`. \ - Consider using `for item in &{}` or similar iterators.", + Consider using `for item in &{}` or similar iterators", ident.node.name, indexed, indexed)); } }