diff --git a/src/fold/fold.rs b/src/fold/fold.rs index 48e488cee..80e075192 100644 --- a/src/fold/fold.rs +++ b/src/fold/fold.rs @@ -82,7 +82,7 @@ pub fn uumain(args: Vec) -> int { } fn handle_obsolete(args: &[String]) -> (Vec, Option) { - let mut args = Vec::::from_slice(args); + let mut args = args.to_vec(); let mut i = 0; while i < args.len() { if args[i].as_slice().char_at(0) == '-' && args[i].len() > 1 && args[i].as_slice().char_at(1).is_digit() { diff --git a/src/hashsum/hashsum.rs b/src/hashsum/hashsum.rs index f4ade0523..6f7969aa7 100644 --- a/src/hashsum/hashsum.rs +++ b/src/hashsum/hashsum.rs @@ -110,7 +110,7 @@ pub fn uumain(args: Vec) -> int { getopts::optflag("V", "version", "output version information and exit"), ); - opts.push_all_move(get_algo_opts(binary_name.as_slice())); + opts.extend(get_algo_opts(binary_name.as_slice()).into_iter()); let matches = match getopts::getopts(args.tail(), opts.as_slice()) { Ok(m) => m, diff --git a/src/head/head.rs b/src/head/head.rs index 4cf95035c..8f7f0d26f 100644 --- a/src/head/head.rs +++ b/src/head/head.rs @@ -133,7 +133,7 @@ pub fn uumain(args: Vec) -> int { // In case is found, the options vector will get rid of that object so that // getopts works correctly. fn obsolete(options: &[String]) -> (Vec, Option) { - let mut options: Vec = Vec::from_slice(options); + let mut options: Vec = options.to_vec(); let mut a = 0; let b = options.len(); diff --git a/src/id/id.rs b/src/id/id.rs index 599ff4a78..f58c2f4c2 100644 --- a/src/id/id.rs +++ b/src/id/id.rs @@ -51,17 +51,20 @@ mod audit { pub type au_emod_t = c_uint; pub type au_class_t = c_int; + #[repr(C)] pub struct au_mask { pub am_success: c_uint, pub am_failure: c_uint } pub type au_mask_t = au_mask; + #[repr(C)] pub struct au_tid_addr { pub port: dev_t, } pub type au_tid_addr_t = au_tid_addr; + #[repr(C)] pub struct c_auditinfo_addr { pub ai_auid: au_id_t, /* Audit user ID */ pub ai_mask: au_mask_t, /* Audit masks. */ diff --git a/src/seq/seq.rs b/src/seq/seq.rs index c6eb9106a..fc2d60cba 100644 --- a/src/seq/seq.rs +++ b/src/seq/seq.rs @@ -65,7 +65,7 @@ fn parse_options(args: Vec, options: &mut SeqOptions) -> Result options.widths = true, "--" => { - seq_args.push_all_move(iter.collect()); + seq_args.extend(iter); break; }, _ => { diff --git a/src/tail/tail.rs b/src/tail/tail.rs index e40a36d4f..712da2a04 100644 --- a/src/tail/tail.rs +++ b/src/tail/tail.rs @@ -119,7 +119,7 @@ pub fn uumain(args: Vec) -> int { // In case is found, the options vector will get rid of that object so that // getopts works correctly. fn obsolete (options: &[String]) -> (Vec, Option) { - let mut options: Vec = Vec::from_slice(options); + let mut options: Vec = options.to_vec(); let mut a = 0; let b = options.len(); diff --git a/src/tee/tee.rs b/src/tee/tee.rs index 3e5445f97..6439cfc28 100644 --- a/src/tee/tee.rs +++ b/src/tee/tee.rs @@ -59,7 +59,8 @@ fn options(args: &[String]) -> Result { let help = format!("{}\n\nUsage:\n {} {}\n\n{}\n{}", version, program, arguments, usage(brief, opts), comment); - let names = m.free.clone().into_iter().collect::>().append_one("-".to_string()); + let mut names = m.free.clone().into_iter().collect::>(); + names.push("-".to_string()); let to_print = if m.opt_present("help") { Some(help) } else if m.opt_present("version") { Some(version) } else { None };