]> git.lizzy.rs Git - rust.git/commitdiff
format adjust
authorf001 <changchun.fan@qq.com>
Sun, 12 Feb 2017 09:24:59 +0000 (17:24 +0800)
committerf001 <changchun.fan@qq.com>
Sun, 12 Feb 2017 09:24:59 +0000 (17:24 +0800)
clippy_lints/src/methods.rs

index 2885c27e54564ed7632ee59bccecd3defa5a9305..916b62bf2b74589f15b80752795ec597b630ae5a 100644 (file)
@@ -904,11 +904,12 @@ fn lint_cstring_as_ptr(cx: &LateContext, expr: &hir::Expr, new: &hir::Expr, unwr
 
 fn lint_iter_cloned_collect(cx: &LateContext, expr: &hir::Expr, iter_args: &[hir::Expr]) {
     if match_type(cx, cx.tables.expr_ty(expr), &paths::VEC) &&
-        derefs_to_slice(cx, &iter_args[0], cx.tables.expr_ty(&iter_args[0])).is_some() {
+       derefs_to_slice(cx, &iter_args[0], cx.tables.expr_ty(&iter_args[0])).is_some() {
         span_lint(cx,
                   ITER_CLONED_COLLECT,
                   expr.span,
-                  "called `cloned().collect()` on a slice to create a `Vec`. This is more succinctly expressed by calling `to_owned(x)`");
+                  "called `cloned().collect()` on a slice to create a `Vec`. This is more succinctly expressed by \
+                  calling `to_owned(x)`");
     }
 }