mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 03:27:44 +00:00
mkdir: update for latest Rust
I'm doing this from my phone, but I assume that it's okay to do this directly seeing as I merged mkdir because it was easy to fix.
This commit is contained in:
parent
496a28a301
commit
e3ca4fdcf8
1 changed files with 6 additions and 6 deletions
|
@ -51,7 +51,7 @@ fn main() {
|
|||
return;
|
||||
}
|
||||
if matches.opt_present("version") {
|
||||
println("mkdir v" + VERSION);
|
||||
println!("mkdir v{}", VERSION);
|
||||
return;
|
||||
}
|
||||
let verbose_flag = matches.opt_present("verbose");
|
||||
|
@ -83,9 +83,9 @@ fn main() {
|
|||
|
||||
fn print_help(opts: &[groups::OptGroup]) {
|
||||
println!("mkdir v{} - make a new directory with the given path", VERSION);
|
||||
println("");
|
||||
println("Usage:");
|
||||
print(groups::usage("Create the given DIRECTORY(ies)" +
|
||||
println!("");
|
||||
println!("Usage:");
|
||||
print!("{}", groups::usage("Create the given DIRECTORY(ies)" +
|
||||
" if they do not exist", opts));
|
||||
}
|
||||
|
||||
|
@ -126,7 +126,7 @@ fn exec(dirs: ~[~str], mk_parents: bool, mode: u32, verbose: bool) {
|
|||
if parent_exists && !path.exists() {
|
||||
// if mkdir failed return
|
||||
if !mkdir(&path, mode) {return;}
|
||||
if verbose {println(*dir);}
|
||||
if verbose {println!("{}", *dir);}
|
||||
} else {
|
||||
let mut error_msg = ~"";
|
||||
if !parent_exists {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue