diff --git a/src/ls/ls.rs b/src/ls/ls.rs index eef3b8945..3a91b4a1c 100644 --- a/src/ls/ls.rs +++ b/src/ls/ls.rs @@ -336,14 +336,14 @@ fn display_dir_entry_size(entry: &PathBuf, options: &getopts::Matches) -> (usize fn pad_left(string: String, count: usize) -> String { if count > string.len() { let pad = count - string.len(); - let pad = String::from_utf8(vec![b' ' as u8; pad]).unwrap(); + let pad = String::from_utf8(vec![b' '; pad]).unwrap(); format!("{}{}", pad, string) } else { string } } -fn display_items(items: &Vec, strip: Option<&Path>, options: &getopts::Matches) { +fn display_items(items: &[PathBuf], strip: Option<&Path>, options: &getopts::Matches) { if options.opt_present("long") || options.opt_present("numeric-uid-gid") { let (mut max_links, mut max_size) = (1, 1); for item in items { diff --git a/src/od/od.rs b/src/od/od.rs index 8967a5e8c..d10227fa9 100644 --- a/src/od/od.rs +++ b/src/od/od.rs @@ -478,7 +478,7 @@ fn print_bytes(prefix: &str, input_decoder: &MemoryDecoder, output_info: &Output /// `skip_bytes` is the number of bytes skipped from the input /// `read_bytes` is an optional limit to the number of bytes to read fn open_input_peek_reader<'a>( - input_strings: &'a Vec, + input_strings: &'a [String], skip_bytes: usize, read_bytes: Option, ) -> PeekReader>> {