refactor/fold ~ fix cargo clippy complaint (clippy::needless_borrow)

This commit is contained in:
Roy Ivy III 2021-06-06 10:26:12 -05:00
parent 28e176cbba
commit 2bf06c3104

View file

@ -109,7 +109,7 @@ fn handle_obsolete(args: &[String]) -> (Vec<String>, Option<String>) {
fn fold(filenames: Vec<String>, bytes: bool, spaces: bool, width: usize) {
for filename in &filenames {
let filename: &str = &filename;
let filename: &str = filename;
let mut stdin_buf;
let mut file_buf;
let buffer = BufReader::new(if filename == "-" {