mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-29 20:17:45 +00:00
Merge pull request #662 from jbcrail/replace-deprecated
Replace deprecated methods.
This commit is contained in:
commit
ab5a5ba9e9
5 changed files with 5 additions and 5 deletions
|
@ -174,7 +174,7 @@ pub fn uumain(args: Vec<String>) -> i32 {
|
||||||
};
|
};
|
||||||
|
|
||||||
if !free.is_empty() {
|
if !free.is_empty() {
|
||||||
let string = free.connect(" ");
|
let string = free.join(" ");
|
||||||
if options.escape {
|
if options.escape {
|
||||||
let mut prev_was_slash = false;
|
let mut prev_was_slash = false;
|
||||||
let mut iter = string.chars().enumerate();
|
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("h", "help", "Show help");
|
||||||
opts.optflag("V", "version", "Show program's version");
|
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 }
|
Ok(m) => { m }
|
||||||
_ => { help_menu(program, opts); return 0; }
|
_ => { 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 ws_reg = Regex::new(r"[\t\n\v\f\r ]").unwrap();
|
||||||
let mut fix: String = ws_reg.replace_all(context, " ").trim().to_string();
|
let mut fix: String = ws_reg.replace_all(context, " ").trim().to_string();
|
||||||
let mapped_chunks: Vec<String> = fix.chars().map(tex_mapper).collect();
|
let mapped_chunks: Vec<String> = fix.chars().map(tex_mapper).collect();
|
||||||
fix = mapped_chunks.connect("");
|
fix = mapped_chunks.join("");
|
||||||
fix
|
fix
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -117,6 +117,6 @@ fn exec(filename: &str) {
|
||||||
|
|
||||||
if users.len() > 0 {
|
if users.len() > 0 {
|
||||||
users.sort();
|
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() {
|
let string = if matches.free.is_empty() {
|
||||||
"y".to_string()
|
"y".to_string()
|
||||||
} else {
|
} else {
|
||||||
matches.free.connect(" ")
|
matches.free.join(" ")
|
||||||
};
|
};
|
||||||
|
|
||||||
exec(&string[..]);
|
exec(&string[..]);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue