Remove all use of format!("string literal")

This commit is contained in:
mcarton 2016-02-20 17:33:53 +01:00
parent 5fe6e9f911
commit 222086d62b
3 changed files with 5 additions and 5 deletions

View file

@ -317,8 +317,8 @@ impl LateLintPass for LoopsPass {
span_lint(cx,
UNUSED_COLLECT,
expr.span,
&format!("you are collect()ing an iterator and throwing away the result. Consider \
using an explicit for loop to exhaust the iterator"));
&"you are collect()ing an iterator and throwing away the result. \
Consider using an explicit for loop to exhaust the iterator");
}
}
}

View file

@ -589,7 +589,7 @@ fn lint_extend(cx: &LateContext, expr: &Expr, args: &MethodArgs) {
span_lint(cx,
EXTEND_FROM_SLICE,
expr.span,
&format!("use of `extend` to extend a Vec by a slice"))
&"use of `extend` to extend a Vec by a slice")
.span_suggestion(expr.span,
"try this",
format!("{}.extend_from_slice({}{})",

View file

@ -491,12 +491,12 @@ fn check_type(cx: &LateContext, ty: &Ty) {
visitor.visit_ty(ty);
visitor.score
};
// println!("{:?} --> {}", ty, score);
if score > 250 {
span_lint(cx,
TYPE_COMPLEXITY,
ty.span,
&format!("very complex type used. Consider factoring parts into `type` definitions"));
&"very complex type used. Consider factoring parts into `type` definitions");
}
}