mirror of
https://github.com/uutils/coreutils.git
synced 2026-06-10 15:48:22 -07:00
Merge pull request #662 from jbcrail/replace-deprecated
Replace deprecated methods.
This commit is contained in:
+1
-1
@@ -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; }
|
||||
};
|
||||
|
||||
+1
-1
@@ -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
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -117,6 +117,6 @@ fn exec(filename: &str) {
|
||||
|
||||
if users.len() > 0 {
|
||||
users.sort();
|
||||
println!("{}", users.connect(" "));
|
||||
println!("{}", users.join(" "));
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -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[..]);
|
||||
|
||||
Reference in New Issue
Block a user