1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2026-01-21 04:31:13 +00:00

refactor/polish ~ fix cargo clippy complaint (same_item_push)

This commit is contained in:
Roy Ivy III 2020-10-10 13:33:38 -05:00
parent 7b4d81efd4
commit 6fa16343f1

View file

@ -69,10 +69,7 @@ struct FilenameGenerator {
impl FilenameGenerator {
fn new(name_len: usize) -> FilenameGenerator {
let mut indices: Vec<usize> = Vec::new();
for _ in 0..name_len {
indices.push(0);
}
let indices: Vec<usize> = vec![0; name_len];
FilenameGenerator {
name_len,
nameset_indices: RefCell::new(indices),