diff --git a/src/bin/cargo-fmt.rs b/src/bin/cargo-fmt.rs index 683c2d433a7..cf476edf7ca 100644 --- a/src/bin/cargo-fmt.rs +++ b/src/bin/cargo-fmt.rs @@ -99,8 +99,8 @@ fn format_crate(verbosity: Verbosity) -> Result { let files: Vec<_> = targets.into_iter() .filter(|t| t.kind.should_format()) .inspect(|t| if verbosity == Verbosity::Verbose { - println!("[{:?}] {:?}", t.kind, t.path) - }) + println!("[{:?}] {:?}", t.kind, t.path) + }) .map(|t| t.path) .collect(); diff --git a/src/bin/rustfmt.rs b/src/bin/rustfmt.rs index 9d66154a814..de12252df0e 100644 --- a/src/bin/rustfmt.rs +++ b/src/bin/rustfmt.rs @@ -348,16 +348,16 @@ fn determine_operation(matches: &Matches) -> FmtResult { try!(io::stdin().read_to_string(&mut buffer)); return Ok(Operation::Stdin { - input: buffer, - config_path: config_path, - }); + input: buffer, + config_path: config_path, + }); } // We append files from `--file-lines` later in `execute()`. let files: Vec<_> = matches.free.iter().map(PathBuf::from).collect(); Ok(Operation::Format { - files: files, - config_path: config_path, - }) + files: files, + config_path: config_path, + }) } diff --git a/src/chains.rs b/src/chains.rs index f0a3f56822d..9a3c329d1c4 100644 --- a/src/chains.rs +++ b/src/chains.rs @@ -76,7 +76,7 @@ /// .qux /// ``` -use {Indent, Shape}; +use Shape; use rewrite::{Rewrite, RewriteContext}; use utils::{wrap_str, first_line_width}; use expr::rewrite_call; diff --git a/src/expr.rs b/src/expr.rs index f893f9cd12c..7651d543e93 100644 --- a/src/expr.rs +++ b/src/expr.rs @@ -1235,7 +1235,7 @@ impl Rewrite for ast::Arm { let pats_str = format!("{}{}", pats_str, guard_str); // Where the next text can start. - let mut line_start = trimmed_last_line_width(&pats_str); + let line_start = trimmed_last_line_width(&pats_str); let body = match body.node { ast::ExprKind::Block(ref block) if !is_unsafe_block(block) && diff --git a/tests/system.rs b/tests/system.rs index a2a4c0eeedf..a0a8eefa277 100644 --- a/tests/system.rs +++ b/tests/system.rs @@ -212,9 +212,9 @@ fn read_config(filename: &str) -> Config { get_config(sig_comments.get("config").map(|x| &(*x)[..])) } else { get_config(Path::new(filename) - .with_extension("toml") - .file_name() - .and_then(std::ffi::OsStr::to_str)) + .with_extension("toml") + .file_name() + .and_then(std::ffi::OsStr::to_str)) }; for (key, val) in &sig_comments { diff --git a/tests/target/expr.rs b/tests/target/expr.rs index 6b1ae7ec555..025afa4c38a 100644 --- a/tests/target/expr.rs +++ b/tests/target/expr.rs @@ -223,9 +223,9 @@ fn casts() { fn indices() { let x = (aaaaaaaaaaaaaaaaaaaaaaaaaaaa + bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb + cccccccccccccccc) - [x + y + z]; + [x + y + z]; let y = (aaaaaaaaaaaaaaaaaaaaaaaaaaaa + bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb + cccccccccccccccc) - [xxxxx + yyyyy + zzzzz]; + [xxxxx + yyyyy + zzzzz]; } fn repeats() { @@ -292,6 +292,6 @@ fn issue1106() { } for entry in WalkDir::new(path) - .into_iter() - .filter_entry(|entry| exclusions.filter_entry(entry)) {} + .into_iter() + .filter_entry(|entry| exclusions.filter_entry(entry)) {} }