diff --git a/src/loops.rs b/src/loops.rs index 2754f743caa9..9e5745950dd7 100644 --- a/src/loops.rs +++ b/src/loops.rs @@ -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"); } } } diff --git a/src/methods.rs b/src/methods.rs index 39f69f63d7b6..f776d5890b79 100644 --- a/src/methods.rs +++ b/src/methods.rs @@ -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({}{})", diff --git a/src/types.rs b/src/types.rs index 7cfcc76193d4..7521bc48046e 100644 --- a/src/types.rs +++ b/src/types.rs @@ -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"); } }