mirror of
https://github.com/uutils/coreutils
synced 2024-11-16 17:58:06 +00:00
paste: Create vec with capacity
This commit is contained in:
parent
ff14f25c34
commit
85a81d328a
1 changed files with 2 additions and 2 deletions
|
@ -9,7 +9,7 @@
|
|||
|
||||
use clap::{crate_version, App, AppSettings, Arg};
|
||||
use std::fs::File;
|
||||
use std::io::{stdin, BufRead, BufReader, Read, stdout, Write};
|
||||
use std::io::{stdin, stdout, BufRead, BufReader, Read, Write};
|
||||
use std::path::Path;
|
||||
use uucore::error::{FromIo, UResult};
|
||||
|
||||
|
@ -76,7 +76,7 @@ pub fn uu_app<'a>() -> App<'a> {
|
|||
}
|
||||
|
||||
fn paste(filenames: Vec<String>, serial: bool, delimiters: &str) -> UResult<()> {
|
||||
let mut files = vec![];
|
||||
let mut files = Vec::with_capacity(filenames.len());
|
||||
for name in filenames {
|
||||
let file = if name == "-" {
|
||||
None
|
||||
|
|
Loading…
Reference in a new issue