mirror of
https://github.com/uutils/coreutils
synced 2024-11-15 17:28:03 +00:00
Replace deprecated methods.
This commit is contained in:
parent
b5a5816271
commit
157c20c7d3
5 changed files with 5 additions and 5 deletions
|
@ -174,7 +174,7 @@ pub fn uumain(args: Vec<String>) -> 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();
|
||||
|
|
|
@ -55,7 +55,7 @@ pub fn uumain(args: Vec<String>) -> 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; }
|
||||
};
|
||||
|
|
|
@ -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<String> = fix.chars().map(tex_mapper).collect();
|
||||
fix = mapped_chunks.connect("");
|
||||
fix = mapped_chunks.join("");
|
||||
fix
|
||||
}
|
||||
|
||||
|
|
|
@ -117,6 +117,6 @@ fn exec(filename: &str) {
|
|||
|
||||
if users.len() > 0 {
|
||||
users.sort();
|
||||
println!("{}", users.connect(" "));
|
||||
println!("{}", users.join(" "));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -50,7 +50,7 @@ pub fn uumain(args: Vec<String>) -> i32 {
|
|||
let string = if matches.free.is_empty() {
|
||||
"y".to_string()
|
||||
} else {
|
||||
matches.free.connect(" ")
|
||||
matches.free.join(" ")
|
||||
};
|
||||
|
||||
exec(&string[..]);
|
||||
|
|
Loading…
Reference in a new issue