loops: fix two trailing periods in lint msgs

This commit is contained in:
Georg Brandl 2015-08-17 07:30:33 +02:00
parent c4b07ead17
commit caeb72c47b

View File

@ -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));
}
}