refactor/expand ~ fix cargo clippy complaint (clippy::manual_str_repeat)

This commit is contained in:
Roy Ivy III 2021-06-06 11:29:35 -05:00
parent 122d82e835
commit 489f9e8386

View file

@ -15,7 +15,6 @@ extern crate uucore;
use clap::{crate_version, App, Arg, ArgMatches};
use std::fs::File;
use std::io::{stdin, stdout, BufRead, BufReader, BufWriter, Read, Write};
use std::iter::repeat;
use std::str::from_utf8;
use unicode_width::UnicodeWidthChar;
@ -90,7 +89,7 @@ impl Options {
})
.max()
.unwrap(); // length of tabstops is guaranteed >= 1
let tspaces = repeat(' ').take(nspaces).collect();
let tspaces = " ".repeat(nspaces);
let files: Vec<String> = match matches.values_of(options::FILES) {
Some(s) => s.map(|v| v.to_string()).collect(),