From f61ba91c2da589553ef3207134955768c26c00b3 Mon Sep 17 00:00:00 2001 From: Manish Goregaokar Date: Fri, 4 Dec 2015 18:02:19 +0530 Subject: [PATCH] Minor clippy fixes --- src/bin/rustfmt.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bin/rustfmt.rs b/src/bin/rustfmt.rs index 04251d09c747..f3ffccfbf7b5 100644 --- a/src/bin/rustfmt.rs +++ b/src/bin/rustfmt.rs @@ -176,7 +176,7 @@ fn determine_operation(matches: &Matches) -> Operation { } // if no file argument is supplied, read from stdin - if matches.free.len() == 0 { + if matches.free.is_empty() { let mut buffer = String::new(); match io::stdin().read_to_string(&mut buffer) { @@ -198,7 +198,7 @@ fn determine_operation(matches: &Matches) -> Operation { None => WriteMode::Replace, }; - let files: Vec<_> = matches.free.iter().map(|a| PathBuf::from(a)).collect(); + let files: Vec<_> = matches.free.iter().map(PathBuf::from).collect(); Operation::Format(files, write_mode) }