From 157c20c7d30e7c931340065bcaa2eff1a10c2f0f Mon Sep 17 00:00:00 2001 From: Joseph Crail Date: Mon, 27 Jul 2015 00:35:34 -0400 Subject: [PATCH] Replace deprecated methods. --- src/echo/echo.rs | 2 +- src/hostname/hostname.rs | 2 +- src/ptx/ptx.rs | 2 +- src/users/users.rs | 2 +- src/yes/yes.rs | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/echo/echo.rs b/src/echo/echo.rs index 11ba354ef..5e3e3f56a 100644 --- a/src/echo/echo.rs +++ b/src/echo/echo.rs @@ -174,7 +174,7 @@ pub fn uumain(args: Vec) -> i32 { }; if !free.is_empty() { - let string = free.connect(" "); + let string = free.join(" "); if options.escape { let mut prev_was_slash = false; let mut iter = string.chars().enumerate(); diff --git a/src/hostname/hostname.rs b/src/hostname/hostname.rs index a890549cd..fec9d71b4 100644 --- a/src/hostname/hostname.rs +++ b/src/hostname/hostname.rs @@ -55,7 +55,7 @@ pub fn uumain(args: Vec) -> i32 { opts.optflag("h", "help", "Show help"); opts.optflag("V", "version", "Show program's version"); - let matches = match opts.parse(args.tail()) { + let matches = match opts.parse(&args[1..]) { Ok(m) => { m } _ => { help_menu(program, opts); return 0; } }; diff --git a/src/ptx/ptx.rs b/src/ptx/ptx.rs index ca6bd0f99..25f8a18df 100644 --- a/src/ptx/ptx.rs +++ b/src/ptx/ptx.rs @@ -421,7 +421,7 @@ fn adjust_tex_str(context: &str) -> String { let ws_reg = Regex::new(r"[\t\n\v\f\r ]").unwrap(); let mut fix: String = ws_reg.replace_all(context, " ").trim().to_string(); let mapped_chunks: Vec = fix.chars().map(tex_mapper).collect(); - fix = mapped_chunks.connect(""); + fix = mapped_chunks.join(""); fix } diff --git a/src/users/users.rs b/src/users/users.rs index 17aafcf67..d46092f8b 100644 --- a/src/users/users.rs +++ b/src/users/users.rs @@ -117,6 +117,6 @@ fn exec(filename: &str) { if users.len() > 0 { users.sort(); - println!("{}", users.connect(" ")); + println!("{}", users.join(" ")); } } diff --git a/src/yes/yes.rs b/src/yes/yes.rs index 870d61128..52af0f53a 100644 --- a/src/yes/yes.rs +++ b/src/yes/yes.rs @@ -50,7 +50,7 @@ pub fn uumain(args: Vec) -> i32 { let string = if matches.free.is_empty() { "y".to_string() } else { - matches.free.connect(" ") + matches.free.join(" ") }; exec(&string[..]);