From 92093644bbe021c6c8257f9bccf2a07b9e90d283 Mon Sep 17 00:00:00 2001 From: Michael Gehring Date: Thu, 20 Nov 2014 20:36:50 +0100 Subject: [PATCH 1/6] chmod: fix build on freebsd --- src/chmod/chmod.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/chmod/chmod.rs b/src/chmod/chmod.rs index 15b34f299..6faf93b6b 100644 --- a/src/chmod/chmod.rs +++ b/src/chmod/chmod.rs @@ -145,7 +145,7 @@ fn verify_mode(mode: &str) -> Result<(), String> { Ok(()) } -fn chmod(files: Vec, changes: bool, quiet: bool, verbose: bool, preserve_root: bool, recursive: bool, fmode: Option, cmode: Option<&String>) -> Result<(), int> { +fn chmod(files: Vec, changes: bool, quiet: bool, verbose: bool, preserve_root: bool, recursive: bool, fmode: Option, cmode: Option<&String>) -> Result<(), int> { let mut r = Ok(()); for filename in files.iter() { @@ -181,7 +181,7 @@ fn chmod(files: Vec, changes: bool, quiet: bool, verbose: bool, preserve r } -fn chmod_file(file: &Path, name: &str, changes: bool, quiet: bool, verbose: bool, fmode: Option, cmode: Option<&String>) -> Result<(), int> { +fn chmod_file(file: &Path, name: &str, changes: bool, quiet: bool, verbose: bool, fmode: Option, cmode: Option<&String>) -> Result<(), int> { let path = name.to_c_str(); match fmode { Some(mode) => { @@ -279,7 +279,7 @@ fn chmod_file(file: &Path, name: &str, changes: bool, quiet: bool, verbose: bool '+' | '-' | '=' => (ch, change.slice_from(1)), _ => ('=', change) }; - let mode = from_str_radix::(slice, 8).unwrap(); // already verified + let mode = from_str_radix::(slice, 8).unwrap() as libc::mode_t; // already verified match action { '+' => fperm |= mode, '-' => fperm &= !mode, From 52ea352ca3601f588a71224168b466925462e516 Mon Sep 17 00:00:00 2001 From: Michael Gehring Date: Thu, 20 Nov 2014 20:45:52 +0100 Subject: [PATCH 2/6] test/{seq,tr,truncate,unexpand}: fix build --- test/seq.rs | 8 ++++---- test/tr.rs | 10 +++++----- test/truncate.rs | 4 ++-- test/unexpand.rs | 26 +++++++++++++------------- 4 files changed, 24 insertions(+), 24 deletions(-) diff --git a/test/seq.rs b/test/seq.rs index 8f6569ca8..5c046e43b 100644 --- a/test/seq.rs +++ b/test/seq.rs @@ -5,28 +5,28 @@ static PROGNAME: &'static str = "./seq"; #[test] fn test_count_up() { - let p = Command::new(PROGNAME).args(["10"]).output().unwrap(); + let p = Command::new(PROGNAME).args(&["10"]).output().unwrap(); let out = str::from_utf8(p.output.as_slice()).unwrap(); assert_eq!(out, "1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n"); } #[test] fn test_count_down() { - let p = Command::new(PROGNAME).args(["--", "5", "-1", "1"]).output().unwrap(); + let p = Command::new(PROGNAME).args(&["--", "5", "-1", "1"]).output().unwrap(); let out = str::from_utf8(p.output.as_slice()).unwrap(); assert_eq!(out, "5\n4\n3\n2\n1\n"); } #[test] fn test_separator_and_terminator() { - let p = Command::new(PROGNAME).args(["-s", ",", "-t", "!", "2", "6"]).output().unwrap(); + let p = Command::new(PROGNAME).args(&["-s", ",", "-t", "!", "2", "6"]).output().unwrap(); let out = str::from_utf8(p.output.as_slice()).unwrap(); assert_eq!(out, "2,3,4,5,6!"); } #[test] fn test_equalize_widths() { - let p = Command::new(PROGNAME).args(["-w", "5", "10"]).output().unwrap(); + let p = Command::new(PROGNAME).args(&["-w", "5", "10"]).output().unwrap(); let out = str::from_utf8(p.output.as_slice()).unwrap(); assert_eq!(out, "05\n06\n07\n08\n09\n10\n"); } diff --git a/test/tr.rs b/test/tr.rs index 281286d81..b0c8cffed 100644 --- a/test/tr.rs +++ b/test/tr.rs @@ -16,31 +16,31 @@ fn run(input: &str, args: &[&'static str]) -> Vec { #[test] fn test_toupper() { - let out = run("!abcd!", ["a-z", "A-Z"]); + let out = run("!abcd!", &["a-z", "A-Z"]); assert_eq!(out.as_slice(), b"!ABCD!"); } #[test] fn test_small_set2() { - let out = run("@0123456789", ["0-9", "X"]); + let out = run("@0123456789", &["0-9", "X"]); assert_eq!(out.as_slice(), b"@XXXXXXXXXX"); } #[test] fn test_unicode() { - let out = run("(,°□°), ┬─┬", [", ┬─┬", "╯︵┻━┻"]); + let out = run("(,°□°), ┬─┬", &[", ┬─┬", "╯︵┻━┻"]); assert_eq!(out.as_slice(), "(╯°□°)╯︵┻━┻".as_bytes()); } #[test] fn test_delete() { - let out = run("aBcD", ["-d", "a-z"]); + let out = run("aBcD", &["-d", "a-z"]); assert_eq!(out.as_slice(), b"BD"); } #[test] fn test_delete_complement() { - let out = run("aBcD", ["-d", "-c", "a-z"]); + let out = run("aBcD", &["-d", "-c", "a-z"]); assert_eq!(out.as_slice(), b"ac"); } diff --git a/test/truncate.rs b/test/truncate.rs index a4eaf6c51..2bdcea8a0 100644 --- a/test/truncate.rs +++ b/test/truncate.rs @@ -15,7 +15,7 @@ fn make_file(name: &str) -> io::File { #[test] fn test_increase_file_size() { let mut file = make_file(TFILE1); - if !Command::new(PROGNAME).args(["-s", "+5K", TFILE1]).status().unwrap().success() { + if !Command::new(PROGNAME).args(&["-s", "+5K", TFILE1]).status().unwrap().success() { panic!(); } file.seek(0, io::SeekEnd).unwrap(); @@ -29,7 +29,7 @@ fn test_increase_file_size() { fn test_decrease_file_size() { let mut file = make_file(TFILE2); file.write(b"1234567890").unwrap(); - if !Command::new(PROGNAME).args(["--size=-4", TFILE2]).status().unwrap().success() { + if !Command::new(PROGNAME).args(&["--size=-4", TFILE2]).status().unwrap().success() { panic!(); } file.seek(0, io::SeekEnd).unwrap(); diff --git a/test/unexpand.rs b/test/unexpand.rs index 4d7e660d1..a53d68cfd 100644 --- a/test/unexpand.rs +++ b/test/unexpand.rs @@ -16,56 +16,56 @@ fn run(input: &str, args: &[&'static str]) -> Vec { #[test] fn unexpand_init_0() { - let out = run(" 1\n 2\n 3\n 4\n", ["-t4"]); + let out = run(" 1\n 2\n 3\n 4\n", &["-t4"]); assert_eq!(out.as_slice(), b" 1\n 2\n 3\n\t4\n"); } #[test] fn unexpand_init_1() { - let out = run(" 5\n 6\n 7\n 8\n", ["-t4"]); + let out = run(" 5\n 6\n 7\n 8\n", &["-t4"]); assert_eq!(out.as_slice(), b"\t 5\n\t 6\n\t 7\n\t\t8\n"); } #[test] fn unexpand_init_list_0() { - let out = run(" 1\n 2\n 3\n 4\n", ["-t2,4"]); + let out = run(" 1\n 2\n 3\n 4\n", &["-t2,4"]); assert_eq!(out.as_slice(), b" 1\n\t2\n\t 3\n\t\t4\n"); } #[test] fn unexpand_init_list_1() { // Once the list is exhausted, spaces are not converted anymore - let out = run(" 5\n 6\n 7\n 8\n", ["-t2,4"]); + let out = run(" 5\n 6\n 7\n 8\n", &["-t2,4"]); assert_eq!(out.as_slice(), b"\t\t 5\n\t\t 6\n\t\t 7\n\t\t 8\n"); } #[test] fn unexpand_aflag_0() { - let out = run("e E\nf F\ng G\nh H\n", []); + let out = run("e E\nf F\ng G\nh H\n", &[]); assert_eq!(out.as_slice(), b"e E\nf F\ng G\nh H\n"); } #[test] fn unexpand_aflag_1() { - let out = run("e E\nf F\ng G\nh H\n", ["-a"]); + let out = run("e E\nf F\ng G\nh H\n", &["-a"]); assert_eq!(out.as_slice(), b"e E\nf F\ng\tG\nh\t H\n"); } #[test] fn unexpand_aflag_2() { - let out = run("e E\nf F\ng G\nh H\n", ["-t8"]); + let out = run("e E\nf F\ng G\nh H\n", &["-t8"]); assert_eq!(out.as_slice(), b"e E\nf F\ng\tG\nh\t H\n"); } #[test] fn unexpand_first_only_0() { - let out = run(" A B", ["-t3"]); + let out = run(" A B", &["-t3"]); assert_eq!(out.as_slice(), b"\t\t A\t B"); } #[test] fn unexpand_first_only_1() { - let out = run(" A B", ["-t3", "--first-only"]); + let out = run(" A B", &["-t3", "--first-only"]); assert_eq!(out.as_slice(), b"\t\t A B"); } @@ -73,20 +73,20 @@ fn unexpand_first_only_1() { fn unexpand_trailing_space_0() { // evil // Individual spaces before fields starting with non blanks should not be // converted, unless they are at the beginning of the line. - let out = run("123 \t1\n123 1\n123 \n123 ", ["-t4"]); + let out = run("123 \t1\n123 1\n123 \n123 ", &["-t4"]); assert_eq!(out.as_slice(), b"123\t\t1\n123 1\n123 \n123 "); } #[test] fn unexpand_trailing_space_1() { // super evil - let out = run(" abc d e f g ", ["-t1"]); + let out = run(" abc d e f g ", &["-t1"]); assert_eq!(out.as_slice(), b"\tabc d e\t\tf\t\tg "); } #[test] fn unexpand_spaces_follow_tabs_0() { // The two first spaces can be included into the first tab. - let out = run(" \t\t A", []); + let out = run(" \t\t A", &[]); assert_eq!(out.as_slice(), b"\t\t A"); } @@ -97,7 +97,7 @@ fn unexpand_spaces_follow_tabs_1() { // evil // ' \t' -> '\t' // second tabstop (4) // ' ' -> '\t' // third tabstop (5) // ' B \t' -> ' B \t' // after the list is exhausted, nothing must change - let out = run("a \t B \t", ["-t1,4,5"]); + let out = run("a \t B \t", &["-t1,4,5"]); assert_eq!(out.as_slice(), b"a\t\t B \t"); } From cb4b5bce29e483caf290fffe84482d48628c0ea8 Mon Sep 17 00:00:00 2001 From: Michael Gehring Date: Fri, 21 Nov 2014 10:09:43 +0100 Subject: [PATCH 3/6] Remove now invalid format specifiers --- src/base64/base64.rs | 4 +-- src/basename/basename.rs | 4 +-- src/cat/cat.rs | 12 ++++----- src/chroot/chroot.rs | 16 +++++------ src/common/c_types.rs | 10 +++---- src/cp/cp.rs | 12 ++++----- src/dirname/dirname.rs | 10 +++---- src/du/du.rs | 8 +++--- src/echo/echo.rs | 8 +++--- src/env/env.rs | 16 +++++------ src/expand/expand.rs | 10 +++---- src/head/head.rs | 6 ++--- src/hostname/hostname.rs | 12 ++++----- src/id/id.rs | 58 ++++++++++++++++++++-------------------- src/logname/logname.rs | 4 +-- src/nl/nl.rs | 2 +- src/nohup/nohup.rs | 8 +++--- src/paste/paste.rs | 2 +- src/printenv/printenv.rs | 4 +-- src/pwd/pwd.rs | 2 +- src/realpath/realpath.rs | 10 +++---- src/relpath/relpath.rs | 10 +++---- src/rm/rm.rs | 4 +-- src/rmdir/rmdir.rs | 4 +-- src/seq/seq.rs | 14 +++++----- src/sleep/sleep.rs | 6 ++--- src/sort/sort.rs | 4 +-- src/split/split.rs | 2 +- src/sum/sum.rs | 2 +- src/sync/sync.rs | 4 +-- src/tac/tac.rs | 2 +- src/tail/tail.rs | 6 ++--- src/timeout/timeout.rs | 2 +- src/touch/touch.rs | 8 +++--- src/truncate/truncate.rs | 2 +- src/uname/uname.rs | 2 +- src/unexpand/unexpand.rs | 18 ++++++------- src/uniq/uniq.rs | 2 +- src/unlink/unlink.rs | 6 ++--- src/uptime/uptime.rs | 12 ++++----- src/users/users.rs | 2 +- src/wc/wc.rs | 2 +- src/whoami/whoami.rs | 4 +-- src/yes/yes.rs | 2 +- 44 files changed, 169 insertions(+), 169 deletions(-) diff --git a/src/base64/base64.rs b/src/base64/base64.rs index 7d17d6566..18c82823e 100644 --- a/src/base64/base64.rs +++ b/src/base64/base64.rs @@ -68,7 +68,7 @@ pub fn uumain(args: Vec) -> int { Some(s) => match from_str(s.as_slice()) { Some(s) => s, None => { - error!("error: {:s}", "Argument to option 'wrap' improperly formatted."); + error!("error: {}", "Argument to option 'wrap' improperly formatted."); panic!() } }, @@ -165,7 +165,7 @@ fn encode(input: &mut Reader, line_wrap: uint) { } fn help(progname: &str, usage: &str) { - println!("Usage: {:s} [OPTION]... [FILE]", progname); + println!("Usage: {} [OPTION]... [FILE]", progname); println!(""); println(usage); diff --git a/src/basename/basename.rs b/src/basename/basename.rs index f437fd81c..d6ccd6a61 100644 --- a/src/basename/basename.rs +++ b/src/basename/basename.rs @@ -38,8 +38,8 @@ pub fn uumain(args: Vec) -> int { }; if matches.opt_present("help") { - println!("Usage: {0:s} NAME [SUFFIX]", program); - println!(" or: {0:s} OPTION", program); + println!("Usage: {0} NAME [SUFFIX]", program); + println!(" or: {0} OPTION", program); println!("Print NAME with any leading directory components removed."); println!("If specified, also remove a trailing SUFFIX."); diff --git a/src/cat/cat.rs b/src/cat/cat.rs index 75eb900ea..f91862af4 100644 --- a/src/cat/cat.rs +++ b/src/cat/cat.rs @@ -44,7 +44,7 @@ pub fn uumain(args: Vec) -> int { println!("cat 1.0.0"); println!(""); println!("Usage:"); - println!(" {0:s} [OPTION]... [FILE]...", program); + println!(" {0} [OPTION]... [FILE]...", program); println!(""); print(getopts::usage("Concatenate FILE(s), or standard input, to \ standard output.", &opts).as_slice()); @@ -119,7 +119,7 @@ fn write_lines(files: Vec, number: NumberingMode, squeeze_blank: bool, if in_buf[pos] == '\n' as u8 { if !at_line_start || !squeeze_blank { if at_line_start && number == NumberingMode::NumberAll { - (write!(&mut writer, "{0:6u}\t", line_counter)).unwrap(); + (write!(&mut writer, "{0:6}\t", line_counter)).unwrap(); line_counter += 1; } if show_ends { @@ -134,7 +134,7 @@ fn write_lines(files: Vec, number: NumberingMode, squeeze_blank: bool, continue; } if at_line_start && number != NumberingMode::NumberNone { - (write!(&mut writer, "{0:6u}\t", line_counter)).unwrap(); + (write!(&mut writer, "{0:6}\t", line_counter)).unwrap(); line_counter += 1; } match in_buf.slice_from(pos).iter().position(|c| *c == '\n' as u8) { @@ -192,7 +192,7 @@ fn write_bytes(files: Vec, number: NumberingMode, squeeze_blank: bool, if byte == '\n' as u8 { if !at_line_start || !squeeze_blank { if at_line_start && number == NumberingMode::NumberAll { - (write!(&mut writer, "{0:6u}\t", line_counter)).unwrap(); + (write!(&mut writer, "{0:6}\t", line_counter)).unwrap(); line_counter += 1; } if show_ends { @@ -207,7 +207,7 @@ fn write_bytes(files: Vec, number: NumberingMode, squeeze_blank: bool, continue; } if at_line_start && number != NumberingMode::NumberNone { - (write!(&mut writer, "{0:6u}\t", line_counter)).unwrap(); + (write!(&mut writer, "{0:6}\t", line_counter)).unwrap(); line_counter += 1; at_line_start = false; } @@ -284,7 +284,7 @@ fn open(path: &str) -> Option<(Box, bool)> { match File::open(&std::path::Path::new(path)) { Ok(f) => Some((box f as Box, false)), Err(e) => { - (writeln!(stderr(), "cat: {0:s}: {1:s}", path, e.to_string())).unwrap(); + (writeln!(stderr(), "cat: {0}: {1}", path, e.to_string())).unwrap(); None }, } diff --git a/src/chroot/chroot.rs b/src/chroot/chroot.rs index bb43cf1eb..eb3c63913 100644 --- a/src/chroot/chroot.rs +++ b/src/chroot/chroot.rs @@ -65,7 +65,7 @@ pub fn uumain(args: Vec) -> int { if opts.free.len() == 0 { println!("Missing operand: NEWROOT"); - println!("Try `{:s} --help` for more information.", program.as_slice()); + println!("Try `{} --help` for more information.", program.as_slice()); return 1 } @@ -108,7 +108,7 @@ fn set_context(root: &Path, options: &getopts::Matches) { Some(ref u) => { let s: Vec<&str> = u.as_slice().split(':').collect(); if s.len() != 2 { - crash!(1, "invalid userspec: `{:s}`", u.as_slice()) + crash!(1, "invalid userspec: `{}`", u.as_slice()) }; s } @@ -131,7 +131,7 @@ fn enter_chroot(root: &Path) { chroot(".".to_c_str().unwrap() as *const libc::c_char) }; if err != 0 { - crash!(1, "cannot chroot to {}: {:s}", root_str, strerror(err).as_slice()) + crash!(1, "cannot chroot to {}: {}", root_str, strerror(err).as_slice()) }; } @@ -143,7 +143,7 @@ fn set_main_group(group: &str) { }; let err = unsafe { setgid(group_id) }; if err != 0 { - crash!(1, "cannot set gid to {:u}: {:s}", group_id, strerror(err).as_slice()) + crash!(1, "cannot set gid to {}: {}", group_id, strerror(err).as_slice()) } } } @@ -175,7 +175,7 @@ fn set_groups_from_str(groups: &str) { ); let err = set_groups(groups_vec); if err != 0 { - crash!(1, "cannot set groups: {:s}", strerror(err).as_slice()) + crash!(1, "cannot set groups: {}", strerror(err).as_slice()) } } } @@ -185,7 +185,7 @@ fn set_user(user: &str) { let user_id = get_pw_from_args(&vec!(String::from_str(user))).unwrap().pw_uid; let err = unsafe { setuid(user_id as libc::uid_t) }; if err != 0 { - crash!(1, "cannot set user to {:s}: {:s}", user, strerror(err).as_slice()) + crash!(1, "cannot set user to {}: {}", user, strerror(err).as_slice()) } } } @@ -204,9 +204,9 @@ fn version() { fn help_menu(program: &str, options: &[getopts::OptGroup]) { version(); println!("Usage:"); - println!(" {:s} [OPTION]… NEWROOT [COMMAND [ARG]…]", program); + println!(" {} [OPTION]… NEWROOT [COMMAND [ARG]…]", program); println!(""); - print!("{:s}", usage( + print!("{}", usage( "Run COMMAND with root directory set to NEWROOT.\n\ If COMMAND is not specified, it defaults to '${SHELL} -i'. \ If ${SHELL} is not set, /bin/sh is used.", options)) diff --git a/src/common/c_types.rs b/src/common/c_types.rs index b78356f2b..ca571ebe9 100644 --- a/src/common/c_types.rs +++ b/src/common/c_types.rs @@ -118,7 +118,7 @@ pub fn get_pw_from_args(free: &Vec) -> Option { if pw_pointer.is_not_null() { Some(unsafe { read(pw_pointer) }) } else { - crash!(1, "{:s}: no such user", username); + crash!(1, "{}: no such user", username); } // Passed the username as a string @@ -129,7 +129,7 @@ pub fn get_pw_from_args(free: &Vec) -> Option { if pw_pointer.is_not_null() { Some(unsafe { read(pw_pointer) }) } else { - crash!(1, "{:s}: no such user", username); + crash!(1, "{}: no such user", username); } } } else { @@ -210,7 +210,7 @@ pub fn group(possible_pw: Option, nflag: bool) { match groups { Err(errno) => - crash!(1, "failed to get group list (errno={:u})", errno), + crash!(1, "failed to get group list (errno={})", errno), Ok(groups) => { for &g in groups.iter() { if nflag { @@ -219,10 +219,10 @@ pub fn group(possible_pw: Option, nflag: bool) { let name = unsafe { from_buf(read(group).gr_name as *const u8) }; - print!("{:s} ", name); + print!("{} ", name); } } else { - print!("{:u} ", g); + print!("{} ", g); } } println!(""); diff --git a/src/cp/cp.rs b/src/cp/cp.rs index c5f366cb0..a884ec9ce 100644 --- a/src/cp/cp.rs +++ b/src/cp/cp.rs @@ -102,13 +102,13 @@ fn copy(matches: getopts::Matches) { Err(e) => if e.kind == io::FileNotFound { false } else { - error!("error: {:s}", e.to_string()); + error!("error: {}", e.to_string()); panic!() } }; if same_file { - error!("error: \"{:s}\" and \"{:s}\" are the same file", + error!("error: \"{}\" and \"{}\" are the same file", source.display().to_string(), dest.display().to_string()); panic!(); @@ -118,7 +118,7 @@ fn copy(matches: getopts::Matches) { if io_result.is_err() { let err = io_result.unwrap_err(); - error!("error: {:s}", err.to_string()); + error!("error: {}", err.to_string()); panic!(); } } else { @@ -129,7 +129,7 @@ fn copy(matches: getopts::Matches) { for source in sources.iter() { if fs::stat(source).unwrap().kind != io::TypeFile { - error!("error: \"{:s}\" is not a file", source.display().to_string()); + error!("error: \"{}\" is not a file", source.display().to_string()); continue; } @@ -137,13 +137,13 @@ fn copy(matches: getopts::Matches) { full_dest.push(source.filename_str().unwrap()); - println!("{:s}", full_dest.display().to_string()); + println!("{}", full_dest.display().to_string()); let io_result = fs::copy(source, &full_dest); if io_result.is_err() { let err = io_result.unwrap_err(); - error!("error: {:s}", err.to_string()); + error!("error: {}", err.to_string()); panic!() } } diff --git a/src/dirname/dirname.rs b/src/dirname/dirname.rs index 0ca8286c1..4fdf927cf 100644 --- a/src/dirname/dirname.rs +++ b/src/dirname/dirname.rs @@ -29,10 +29,10 @@ pub fn uumain(args: Vec) -> int { }; if matches.opt_present("help") { - println!("dirname {:s} - strip last component from file name", VERSION); + println!("dirname {} - strip last component from file name", VERSION); println!(""); println!("Usage:"); - println!(" {0:s} [OPTION] NAME...", program); + println!(" {0} [OPTION] NAME...", program); println!(""); print(getopts::usage("Output each NAME with its last non-slash component and trailing slashes removed; if NAME contains no /'s, output '.' (meaning the current @@ -41,7 +41,7 @@ directory).", &opts).as_slice()); } if matches.opt_present("version") { - println!("dirname version: {:s}", VERSION); + println!("dirname version: {}", VERSION); return 0; } @@ -60,8 +60,8 @@ directory).", &opts).as_slice()); print(separator); } } else { - println!("{0:s}: missing operand", program); - println!("Try '{0:s} --help' for more information.", program); + println!("{0}: missing operand", program); + println!("Try '{0} --help' for more information.", program); return 1; } diff --git a/src/du/du.rs b/src/du/du.rs index bebbfd103..91250519e 100644 --- a/src/du/du.rs +++ b/src/du/du.rs @@ -197,11 +197,11 @@ ers of 1000).", let max_depth = max_depth_str.as_ref().and_then(|s| from_str::(s.as_slice())); match (max_depth_str, max_depth) { (Some(ref s), _) if summarize => { - show_error!("summarizing conflicts with --max-depth={:s}", *s); + show_error!("summarizing conflicts with --max-depth={}", *s); return 1; } (Some(ref s), None) => { - show_error!("invalid maximum depth '{:s}'", *s); + show_error!("invalid maximum depth '{}'", *s); return 1; } (Some(_), Some(_)) | (None, _) => { /* valid */ } @@ -271,9 +271,9 @@ ers of 1000).", let convert_size = |size: u64| -> String { if matches.opt_present("human-readable") || matches.opt_present("si") { if size >= MB { - format!("{:.1f}M", (size as f64) / (MB as f64)) + format!("{:.1}M", (size as f64) / (MB as f64)) } else if size >= KB { - format!("{:.1f}K", (size as f64) / (KB as f64)) + format!("{:.1}K", (size as f64) / (KB as f64)) } else { format!("{}B", size) } diff --git a/src/echo/echo.rs b/src/echo/echo.rs index 773417b30..f546041b3 100644 --- a/src/echo/echo.rs +++ b/src/echo/echo.rs @@ -136,11 +136,11 @@ fn print_help(program: &String) { getopts::optflag("h", "help", "display this help and exit"), getopts::optflag("V", "version", "output version information and exit"), ]; - println!("echo {:s} - display a line of text", VERSION); + println!("echo {} - display a line of text", VERSION); println!(""); println!("Usage:"); - println!(" {0:s} [SHORT-OPTION]... [STRING]...", *program); - println!(" {0:s} LONG-OPTION", *program); + println!(" {0} [SHORT-OPTION]... [STRING]...", *program); + println!(" {0} LONG-OPTION", *program); println!(""); println(getopts::usage("Echo the STRING(s) to standard output.", &opts).as_slice()); println("If -e is in effect, the following sequences are recognized: @@ -160,7 +160,7 @@ fn print_help(program: &String) { } fn print_version() { - println!("echo version: {:s}", VERSION); + println!("echo version: {}", VERSION); } pub fn uumain(args: Vec) -> int { diff --git a/src/env/env.rs b/src/env/env.rs index f35e92336..e5cb91f24 100644 --- a/src/env/env.rs +++ b/src/env/env.rs @@ -22,7 +22,7 @@ struct options { } fn usage(prog: &str) { - println!("Usage: {:s} [OPTION]... [-] [NAME=VALUE]... [COMMAND [ARG]...]", prog); + println!("Usage: {} [OPTION]... [-] [NAME=VALUE]... [COMMAND [ARG]...]", prog); println!("Set each NAME to VALUE in the environment and run COMMAND\n"); println!("Possible options are:"); println!(" -i --ignore-environment\t start with an empty environment"); @@ -43,7 +43,7 @@ fn print_env(null: bool) { let env = std::os::env(); for &(ref n, ref v) in env.iter() { - print!("{:s}={:s}{:c}", + print!("{}={}{}", n.as_slice(), v.as_slice(), if null { '\0' } else { '\n' } @@ -101,14 +101,14 @@ pub fn uumain(args: Vec) -> int { let var = iter.next(); match var { - None => println!("{:s}: this option requires an argument: {:s}", prog, opt.as_slice()), + None => println!("{}: this option requires an argument: {}", prog, opt.as_slice()), Some(s) => opts.unsets.push(s.to_string()) } } _ => { - println!("{:s}: invalid option \"{:s}\"", prog, *opt); - println!("Type \"{:s} --help\" for detailed informations", prog); + println!("{}: invalid option \"{}\"", prog, *opt); + println!("Type \"{} --help\" for detailed informations", prog); return 1; } } @@ -134,13 +134,13 @@ pub fn uumain(args: Vec) -> int { let var = iter.next(); match var { - None => println!("{:s}: this option requires an argument: {:s}", prog, opt.as_slice()), + None => println!("{}: this option requires an argument: {}", prog, opt.as_slice()), Some(s) => opts.unsets.push(s.to_string()) } } _ => { - println!("{:s}: illegal option -- {:c}", prog, c); - println!("Type \"{:s} --help\" for detailed informations", prog); + println!("{}: illegal option -- {}", prog, c); + println!("Type \"{} --help\" for detailed informations", prog); return 1; } } diff --git a/src/expand/expand.rs b/src/expand/expand.rs index 557335cb1..e93d0b5a5 100644 --- a/src/expand/expand.rs +++ b/src/expand/expand.rs @@ -88,7 +88,7 @@ pub fn uumain(args: Vec) -> int { }; if matches.opt_present("help") { - println!("Usage: {:s} [OPTION]... [FILE]...", NAME); + println!("Usage: {} [OPTION]... [FILE]...", NAME); io::print(getopts::usage( "Convert tabs in each FILE to spaces, writing to standard output.\n\ With no FILE, or when FILE is -, read standard input.", &opts).as_slice()); @@ -139,26 +139,26 @@ fn expand(options: Options) { Ok('\t') if init || !options.iflag => { let nb_spaces = to_next_stop(options.tabstops.as_slice(), col); col += nb_spaces; - safe_write!(output, "{:1$s}", "", nb_spaces); + safe_write!(output, "{:1$}", "", nb_spaces); } Ok('\x08') => { if col > 0 { col -= 1; } init = false; - safe_write!(output, "{:c}", '\x08'); + safe_write!(output, "{}", '\x08'); } Ok('\n') => { col = 0; init = true; - safe_write!(output, "{:c}", '\n'); + safe_write!(output, "{}", '\n'); } Ok(c) => { col += 1; if c != ' ' { init = false; } - safe_write!(output, "{:c}", c); + safe_write!(output, "{}", c); } Err(_) => break } diff --git a/src/head/head.rs b/src/head/head.rs index b196942c6..3ddebe779 100644 --- a/src/head/head.rs +++ b/src/head/head.rs @@ -49,13 +49,13 @@ pub fn uumain(args: Vec) -> int { let given_options = match getopts(args.as_slice(), &possible_options) { Ok (m) => { m } Err(_) => { - println!("{:s}", usage(NAME, &possible_options)); + println!("{}", usage(NAME, &possible_options)); return 1; } }; if given_options.opt_present("h") { - println!("{:s}", usage(NAME, &possible_options)); + println!("{}", usage(NAME, &possible_options)); return 0; } if given_options.opt_present("V") { version(); return 0 } @@ -112,7 +112,7 @@ pub fn uumain(args: Vec) -> int { for file in files.iter() { if multiple { if !firstime { pipe_println!(""); } - pipe_println!("==> {:s} <==", file.as_slice()); + pipe_println!("==> {} <==", file.as_slice()); } firstime = false; diff --git a/src/hostname/hostname.rs b/src/hostname/hostname.rs index 8588861d3..d6dcf0b97 100644 --- a/src/hostname/hostname.rs +++ b/src/hostname/hostname.rs @@ -95,7 +95,7 @@ pub fn uumain(args: Vec) -> int { if matches.opt_present("s") { let pos = hostname.as_slice().find_str("."); if pos.is_some() { - println!("{:s}", hostname.as_slice().slice_to(pos.unwrap())); + println!("{}", hostname.as_slice().slice_to(pos.unwrap())); return 0; } } else if matches.opt_present("d") { @@ -106,7 +106,7 @@ pub fn uumain(args: Vec) -> int { } } - println!("{:s}", hostname); + println!("{}", hostname); } } 1 => xsethostname(matches.free.last().unwrap().as_slice()), @@ -124,9 +124,9 @@ fn help_menu(program: &str, options: &[getopts::OptGroup]) { version(); println!(""); println!("Usage:"); - println!(" {:s} [OPTION]... [HOSTNAME]", program); + println!(" {} [OPTION]... [HOSTNAME]", program); println!(""); - print!("{:s}", usage("Print or set the system's host name.", options)); + print!("{}", usage("Print or set the system's host name.", options)); } fn xgethostname() -> String { @@ -156,7 +156,7 @@ fn xsethostname(name: &str) { }; if err != 0 { - println!("Cannot set hostname to {:s}", name); + println!("Cannot set hostname to {}", name); } } @@ -169,6 +169,6 @@ fn xsethostname(name: &str) { }; if err != 0 { - println!("Cannot set hostname to {:s}", name); + println!("Cannot set hostname to {}", name); } } diff --git a/src/id/id.rs b/src/id/id.rs index ee4ba81ee..f43c876be 100644 --- a/src/id/id.rs +++ b/src/id/id.rs @@ -103,13 +103,13 @@ pub fn uumain(args: Vec) -> int { let matches = match getopts(args_t, &options) { Ok(m) => { m }, Err(_) => { - println!("{:s}", usage(NAME, &options)); + println!("{}", usage(NAME, &options)); return 1; } }; if matches.opt_present("h") { - println!("{:s}", usage(NAME, &options)); + println!("{}", usage(NAME, &options)); return 0; } @@ -140,9 +140,9 @@ pub fn uumain(args: Vec) -> int { if nflag && gr.is_not_null() { let gr_name = unsafe { from_buf(read(gr).gr_name as *const u8) }; - println!("{:s}", gr_name); + println!("{}", gr_name); } else { - println!("{:u}", id); + println!("{}", id); } return 0; } @@ -161,9 +161,9 @@ pub fn uumain(args: Vec) -> int { let pw_name = unsafe { from_buf(read(pw).pw_name as *const u8) }; - println!("{:s}", pw_name); + println!("{}", pw_name); } else { - println!("{:u}", id); + println!("{}", id); } return 0; @@ -198,7 +198,7 @@ fn pretty(possible_pw: Option) { let pw = possible_pw.unwrap(); let pw_name = unsafe { from_buf(pw.pw_name as *const u8) }; - print!("uid\t{:s}\ngroups\t", pw_name); + print!("uid\t{}\ngroups\t", pw_name); group(possible_pw, true); } else { let login = unsafe { from_buf(getlogin() as *const u8) }; @@ -210,15 +210,15 @@ fn pretty(possible_pw: Option) { }; if pw.is_null() || is_same_user { - println!("login\t{:s}", login); + println!("login\t{}", login); } if pw.is_not_null() { println!( - "uid\t{:s}", + "uid\t{}", unsafe { from_buf(read(pw).pw_name as *const u8) }) } else { - println!("uid\t{:u}\n", rid); + println!("uid\t{}\n", rid); } let eid = unsafe { getegid() }; @@ -226,10 +226,10 @@ fn pretty(possible_pw: Option) { let pw = unsafe { getpwuid(eid) }; if pw.is_not_null() { println!( - "euid\t{:s}", + "euid\t{}", unsafe { from_buf(read(pw).pw_name as *const u8) }); } else { - println!("euid\t{:u}", eid); + println!("euid\t{}", eid); } } @@ -239,10 +239,10 @@ fn pretty(possible_pw: Option) { let gr = unsafe { getgrgid(rid) }; if gr.is_not_null() { println!( - "rgid\t{:s}", + "rgid\t{}", unsafe { from_buf(read(gr).gr_name as *const u8) }); } else { - println!("rgid\t{:u}", rid); + println!("rgid\t{}", rid); } } @@ -267,7 +267,7 @@ fn pline(possible_pw: Option) { let pw_shell = unsafe { from_buf(pw.pw_shell as *const u8) }; println!( - "{:s}:{:s}:{:u}:{:u}:{:s}:{:d}:{:d}:{:s}:{:s}:{:s}", + "{}:{}:{}:{}:{}:{}:{}:{}:{}:{}", pw_name, pw_passwd, pw.pw_uid, @@ -295,7 +295,7 @@ fn pline(possible_pw: Option) { let pw_shell = unsafe { from_buf(pw.pw_shell as *const u8)}; println!( - "{:s}:{:s}:{:u}:{:u}:{:s}:{:s}:{:s}", + "{}:{}:{}:{}:{}:{}:{}", pw_name, pw_passwd, pw.pw_uid, @@ -317,11 +317,11 @@ fn auditid() { return; } - println!("auid={:u}", auditinfo.ai_auid); + println!("auid={}", auditinfo.ai_auid); println!("mask.success=0x{:x}", auditinfo.ai_mask.am_success); println!("mask.failure=0x{:x}", auditinfo.ai_mask.am_failure); println!("termid.port=0x{:x}", auditinfo.ai_termid.port); - println!("asid={:d}", auditinfo.ai_asid); + println!("asid={}", auditinfo.ai_asid); } fn id_print(possible_pw: Option, @@ -345,44 +345,44 @@ fn id_print(possible_pw: Option, }; let groups = groups.unwrap_or_else(|errno| { - crash!(1, "failed to get group list (errno={:u})", errno); + crash!(1, "failed to get group list (errno={})", errno); }); if possible_pw.is_some() { print!( - "uid={:u}({:s})", + "uid={}({})", uid, unsafe { from_buf(possible_pw.unwrap().pw_name as *const u8) }); } else { - print!("uid={:u}", unsafe { getuid() }); + print!("uid={}", unsafe { getuid() }); } - print!(" gid={:u}", gid); + print!(" gid={}", gid); let gr = unsafe { getgrgid(gid) }; if gr.is_not_null() { print!( - "({:s})", + "({})", unsafe { from_buf(read(gr).gr_name as *const u8) }); } let euid = unsafe { geteuid() }; if p_euid && (euid != uid) { - print!(" euid={:u}", euid); + print!(" euid={}", euid); let pw = unsafe { getpwuid(euid) }; if pw.is_not_null() { print!( - "({:s})", + "({})", unsafe { from_buf(read(pw).pw_name as *const u8) }); } } let egid = unsafe { getegid() }; if p_egid && (egid != gid) { - print!(" egid={:u}", egid); + print!(" egid={}", egid); unsafe { let grp = getgrgid(egid); if grp.is_not_null() { - print!("({:s})", from_buf(read(grp).gr_name as *const u8)); + print!("({})", from_buf(read(grp).gr_name as *const u8)); } } } @@ -393,13 +393,13 @@ fn id_print(possible_pw: Option, let mut first = true; for &gr in groups.iter() { if !first { print!(",") } - print!("{:u}", gr); + print!("{}", gr); let group = unsafe { getgrgid(gr) }; if group.is_not_null() { let name = unsafe { from_buf(read(group).gr_name as *const u8) }; - print!("({:s})", name); + print!("({})", name); } first = false } diff --git a/src/logname/logname.rs b/src/logname/logname.rs index 8462d5330..5ab75574b 100644 --- a/src/logname/logname.rs +++ b/src/logname/logname.rs @@ -62,7 +62,7 @@ pub fn uumain(args: Vec) -> int { version(); println!(""); println!("Usage:"); - println!(" {:s}", program); + println!(" {}", program); println!(""); print(getopts::usage("print user's login name", &opts).as_slice()); return 0; @@ -80,6 +80,6 @@ pub fn uumain(args: Vec) -> int { fn exec() { unsafe { let userlogin = get_userlogin(); - println!("{:s}", userlogin); + println!("{}", userlogin); } } diff --git a/src/nl/nl.rs b/src/nl/nl.rs index 39ce3e56a..51016a4f0 100644 --- a/src/nl/nl.rs +++ b/src/nl/nl.rs @@ -322,7 +322,7 @@ fn pass_all(_: &str, _: ®ex::Regex) -> bool { } fn print_usage(opts: &[OptGroup]) { - println!("{:s}", usage(USAGE, opts)); + println!("{}", usage(USAGE, opts)); } fn version () { diff --git a/src/nohup/nohup.rs b/src/nohup/nohup.rs index 16d305fb2..4aa839671 100644 --- a/src/nohup/nohup.rs +++ b/src/nohup/nohup.rs @@ -93,7 +93,7 @@ pub fn uumain(args: Vec) -> int { if opts.free.len() == 0 { show_error!("Missing operand: COMMAND"); - println!("Try `{:s} --help` for more information.", program.as_slice()); + println!("Try `{} --help` for more information.", program.as_slice()); return 1 } replace_fds(); @@ -179,10 +179,10 @@ fn version() { fn show_usage(program: &str, options: &[getopts::OptGroup]) { version(); println!("Usage:"); - println!(" {:s} COMMAND [ARG]…", program); - println!(" {:s} OPTION", program); + println!(" {} COMMAND [ARG]…", program); + println!(" {} OPTION", program); println!(""); - print!("{:s}", usage( + print!("{}", usage( "Run COMMAND ignoring hangup signals.\n\ If standard input is terminal, it'll be replaced with /dev/null.\n\ If standard output is terminal, it'll be appended to nohup.out instead, \ diff --git a/src/paste/paste.rs b/src/paste/paste.rs index 11a78ad26..38d210c43 100644 --- a/src/paste/paste.rs +++ b/src/paste/paste.rs @@ -39,7 +39,7 @@ pub fn uumain(args: Vec) -> int { println!("{} {}", NAME, VERSION); println!(""); println!("Usage:"); - println!(" {0:s} [OPTION]... [FILE]...", program); + println!(" {0} [OPTION]... [FILE]...", program); println!(""); print!("{}", getopts::usage("Write lines consisting of the sequentially corresponding lines from each FILE, separated by TABs, to standard output.", &opts)); } else if matches.opt_present("version") { diff --git a/src/printenv/printenv.rs b/src/printenv/printenv.rs index d933cb52f..ef442e71e 100644 --- a/src/printenv/printenv.rs +++ b/src/printenv/printenv.rs @@ -41,7 +41,7 @@ pub fn uumain(args: Vec) -> int { println!("printenv 1.0.0"); println!(""); println!("Usage:"); - println!(" {0:s} [VARIABLE]... [OPTION]...", program); + println!(" {0} [VARIABLE]... [OPTION]...", program); println!(""); print(getopts::usage("Prints the given environment VARIABLE(s), otherwise prints them all.", &opts).as_slice()); return 0; @@ -64,7 +64,7 @@ pub fn exec(args: Vec, separator: &str) { if args.is_empty() { let vars = os::env(); for (env_var, value) in vars.into_iter() { - print!("{0:s}={1:s}", env_var, value); + print!("{0}={1}", env_var, value); print(separator); } return; diff --git a/src/pwd/pwd.rs b/src/pwd/pwd.rs index 09974a836..5a3f94c53 100644 --- a/src/pwd/pwd.rs +++ b/src/pwd/pwd.rs @@ -40,7 +40,7 @@ pub fn uumain(args: Vec) -> int { println!("pwd {}", VERSION); println!(""); println!("Usage:"); - println!(" {0:s} [OPTION] NAME...", program); + println!(" {0} [OPTION] NAME...", program); println!(""); print(getopts::usage("Print the full filename of the current working directory.", &opts).as_slice()); } else if matches.opt_present("version") { diff --git a/src/realpath/realpath.rs b/src/realpath/realpath.rs index 982d09ba9..6eabea142 100644 --- a/src/realpath/realpath.rs +++ b/src/realpath/realpath.rs @@ -44,7 +44,7 @@ pub fn uumain(args: Vec) -> int { if opts.free.len() == 0 { show_error!("Missing operand: FILENAME, at least one is required"); - println!("Try `{:s} --help` for more information.", program.as_slice()); + println!("Try `{} --help` for more information.", program.as_slice()); return 1 } @@ -125,11 +125,11 @@ fn version() { fn show_usage(program: &str, options: &[getopts::OptGroup]) { version(); println!("Usage:"); - println!(" {:s} [-s|--strip] [-z|--zero] FILENAME…", program); - println!(" {:s} -V|--version", program); - println!(" {:s} -h|--help", program); + println!(" {} [-s|--strip] [-z|--zero] FILENAME…", program); + println!(" {} -V|--version", program); + println!(" {} -h|--help", program); println!(""); - print!("{:s}", usage( + print!("{}", usage( "Convert each FILENAME to the absolute path.\n\ All the symbolic links will be resolved, resulting path will contain no special components like '.' or '..'.\n\ Each path component must exist or resolution will fail and non-zero exit status returned.\n\ diff --git a/src/relpath/relpath.rs b/src/relpath/relpath.rs index 22f228261..025a55a7b 100644 --- a/src/relpath/relpath.rs +++ b/src/relpath/relpath.rs @@ -42,7 +42,7 @@ pub fn uumain(args: Vec) -> int { if opts.free.len() == 0 { show_error!("Missing operand: TO"); - println!("Try `{:s} --help` for more information.", program.as_slice()); + println!("Try `{} --help` for more information.", program.as_slice()); return 1 } @@ -89,11 +89,11 @@ fn version() { fn show_usage(program: &str, options: &[getopts::OptGroup]) { version(); println!("Usage:"); - println!(" {:s} [-d DIR] TO [FROM]", program); - println!(" {:s} -V|--version", program); - println!(" {:s} -h|--help", program); + println!(" {} [-d DIR] TO [FROM]", program); + println!(" {} -V|--version", program); + println!(" {} -h|--help", program); println!(""); - print!("{:s}", usage( + print!("{}", usage( "Convert TO destination to the relative path from the FROM dir.\n\ If FROM path is omitted, current working dir will be used.", options) ); diff --git a/src/rm/rm.rs b/src/rm/rm.rs index 791a5c940..c157f4016 100644 --- a/src/rm/rm.rs +++ b/src/rm/rm.rs @@ -57,7 +57,7 @@ pub fn uumain(args: Vec) -> int { println!("rm 1.0.0"); println!(""); println!("Usage:"); - println!(" {0:s} [OPTION]... [FILE]...", program); + println!(" {0} [OPTION]... [FILE]...", program); println!(""); print(getopts::usage("Remove (unlink) the FILE(s).", &opts).as_slice()); println!(""); @@ -77,7 +77,7 @@ pub fn uumain(args: Vec) -> int { println!("rm 1.0.0"); } else if matches.free.is_empty() { show_error!("missing an argument"); - show_error!("for help, try '{0:s} --help'", program); + show_error!("for help, try '{0} --help'", program); return 1; } else { let force = matches.opt_present("force"); diff --git a/src/rmdir/rmdir.rs b/src/rmdir/rmdir.rs index b2723d2fc..5d33ff4ed 100644 --- a/src/rmdir/rmdir.rs +++ b/src/rmdir/rmdir.rs @@ -44,14 +44,14 @@ pub fn uumain(args: Vec) -> int { println!("rmdir 1.0.0"); println!(""); println!("Usage:"); - println!(" {0:s} [OPTION]... DIRECTORY...", program); + println!(" {0} [OPTION]... DIRECTORY...", program); println!(""); print(getopts::usage("Remove the DIRECTORY(ies), if they are empty.", &opts).as_slice()); } else if matches.opt_present("version") { println!("rmdir 1.0.0"); } else if matches.free.is_empty() { show_error!("missing an argument"); - show_error!("for help, try '{0:s} --help'", program); + show_error!("for help, try '{0} --help'", program); return 1; } else { let ignore = matches.opt_present("ignore-fail-on-non-empty"); diff --git a/src/seq/seq.rs b/src/seq/seq.rs index 741dd2f7a..52609657f 100644 --- a/src/seq/seq.rs +++ b/src/seq/seq.rs @@ -25,7 +25,7 @@ struct SeqOptions { fn parse_float(s: &str) -> Result{ match from_str(s) { Some(n) => Ok(n), - None => Err(format!("seq: invalid floating point argument: {:s}", s)) + None => Err(format!("seq: invalid floating point argument: {}", s)) } } @@ -136,7 +136,7 @@ fn print_help(program: &String) { ]; println!("seq 1.0.0\n"); println!("Usage:\n {} [-w] [-s string] [-t string] [first [step]] last\n", *program); - println!("{:s}", getopts::usage("Print sequences of numbers", &opts)); + println!("{}", getopts::usage("Print sequences of numbers", &opts)); } fn print_version() { @@ -168,7 +168,7 @@ pub fn uumain(args: Vec) -> int { padding = dec; match parse_float(slice) { Ok(n) => n, - Err(s) => { show_error!("{:s}", s); return 1; } + Err(s) => { show_error!("{}", s); return 1; } } } else { 1.0 @@ -181,7 +181,7 @@ pub fn uumain(args: Vec) -> int { padding = cmp::max(padding, dec); match parse_float(free[1].as_slice()) { Ok(n) => n, - Err(s) => { show_error!("{:s}", s); return 1; } + Err(s) => { show_error!("{}", s); return 1; } } } else { 1.0 @@ -191,7 +191,7 @@ pub fn uumain(args: Vec) -> int { padding = cmp::max(padding, slice.find('.').unwrap_or(slice.len())); match parse_float(slice) { Ok(n) => n, - Err(s) => { show_error!("{:s}", s); return 1; } + Err(s) => { show_error!("{}", s); return 1; } } }; let separator = escape_sequences(options.separator.as_slice()); @@ -245,12 +245,12 @@ fn print_seq(first: f64, step: f64, last: f64, largest_dec: uint, separator: Str i += 1; value = first + i as f64 * step; if !done_printing(value, step, last) { - if !pipe_print!("{:s}", separator) { + if !pipe_print!("{}", separator) { return; } } } if (first >= last && step < 0f64) || (first <= last && step > 0f64) { - pipe_print!("{:s}", terminator); + pipe_print!("{}", terminator); } } diff --git a/src/sleep/sleep.rs b/src/sleep/sleep.rs index 8ebf037c2..4133f1a04 100644 --- a/src/sleep/sleep.rs +++ b/src/sleep/sleep.rs @@ -45,9 +45,9 @@ pub fn uumain(args: Vec) -> int { println!("sleep 1.0.0"); println!(""); println!("Usage:"); - println!(" {0:s} NUMBER[SUFFIX]", program); + println!(" {0} NUMBER[SUFFIX]", program); println!("or"); - println!(" {0:s} OPTION", program); + println!(" {0} OPTION", program); println!(""); print(getopts::usage("Pause for NUMBER seconds. SUFFIX may be 's' for seconds (the default), 'm' for minutes, 'h' for hours or 'd' for days. Unlike most implementations @@ -58,7 +58,7 @@ specified by the sum of their values.", &opts).as_slice()); println!("sleep 1.0.0"); } else if matches.free.is_empty() { show_error!("missing an argument"); - show_error!("for help, try '{0:s} --help'", program); + show_error!("for help, try '{0} --help'", program); return 1; } else { sleep(matches.free); diff --git a/src/sort/sort.rs b/src/sort/sort.rs index 490481852..536b412b6 100644 --- a/src/sort/sort.rs +++ b/src/sort/sort.rs @@ -40,7 +40,7 @@ pub fn uumain(args: Vec) -> int { Err(f) => crash!(1, "Invalid options\n{}", f) }; if matches.opt_present("help") { - println!("Usage: {0:s} [OPTION]... [FILE]...", program); + println!("Usage: {0} [OPTION]... [FILE]...", program); println!("Write the sorted concatenation of all FILE(s) to standard output."); println!(""); print(getopts::usage("Mandatory arguments for long options are mandatory for short options too.", &opts).as_slice()); @@ -152,7 +152,7 @@ fn open<'a>(path: &str) -> Option<(Box, bool)> { match File::open(&std::path::Path::new(path)) { Ok(f) => Some((box f as Box, false)), Err(e) => { - show_error!("sort: {0:s}: {1:s}", path, e.to_string()); + show_error!("sort: {0}: {1}", path, e.to_string()); None }, } diff --git a/src/split/split.rs b/src/split/split.rs index 4282b149b..e4b4fc6a8 100644 --- a/src/split/split.rs +++ b/src/split/split.rs @@ -45,7 +45,7 @@ pub fn uumain(args: Vec) -> int { println!("{} v{}", NAME, VERSION); println!(""); println!("Usage:"); - println!(" {0:s} [OPTION]... [INPUT [PREFIX]]", NAME); + println!(" {0} [OPTION]... [INPUT [PREFIX]]", NAME); println!(""); io::print(getopts::usage("Output fixed-size pieces of INPUT to PREFIXaa, PREFIX ab, ...; default size is 1000, and default PREFIX is 'x'. With no INPUT, or when INPUT is -, read standard input." , &opts).as_slice()); return 0; diff --git a/src/sum/sum.rs b/src/sum/sum.rs index 9a6533fa5..05649085d 100644 --- a/src/sum/sum.rs +++ b/src/sum/sum.rs @@ -93,7 +93,7 @@ pub fn uumain(args: Vec) -> int { println!("{} {}", program, VERSION); println!(""); println!("Usage:"); - println!(" {0:s} [OPTION]... [FILE]...", program); + println!(" {0} [OPTION]... [FILE]...", program); println!(""); print(getopts::usage("checksum and count the blocks in a file", &opts).as_slice()); println!(""); diff --git a/src/sync/sync.rs b/src/sync/sync.rs index adef9c97a..898242f48 100644 --- a/src/sync/sync.rs +++ b/src/sync/sync.rs @@ -175,8 +175,8 @@ fn version() { } fn help(program: &str, options: &[getopts::OptGroup]) { - println!("Usage: {:s} [OPTION]", program); - print!("{:s}", usage("Force changed blocks to disk, update the super block.", options)); + println!("Usage: {} [OPTION]", program); + print!("{}", usage("Force changed blocks to disk, update the super block.", options)); } fn uusync() -> int { diff --git a/src/tac/tac.rs b/src/tac/tac.rs index d2e1a0ad4..6eab7e6a1 100644 --- a/src/tac/tac.rs +++ b/src/tac/tac.rs @@ -40,7 +40,7 @@ pub fn uumain(args: Vec) -> int { println!("tac {}", VERSION); println!(""); println!("Usage:"); - println!(" {0:s} [OPTION]... [FILE]...", program); + println!(" {0} [OPTION]... [FILE]...", program); println!(""); print!("{}", getopts::usage("Write each file to standard output, last line first.", &opts)); } else if matches.opt_present("version") { diff --git a/src/tail/tail.rs b/src/tail/tail.rs index beabc5cc8..999683ff1 100644 --- a/src/tail/tail.rs +++ b/src/tail/tail.rs @@ -57,13 +57,13 @@ pub fn uumain(args: Vec) -> int { let given_options = match getopts(args.as_slice(), &possible_options) { Ok (m) => { m } Err(_) => { - println!("{:s}", usage(NAME, &possible_options)); + println!("{}", usage(NAME, &possible_options)); return 1; } }; if given_options.opt_present("h") { - println!("{:s}", usage(NAME, &possible_options)); + println!("{}", usage(NAME, &possible_options)); return 0; } if given_options.opt_present("V") { version(); return 0 } @@ -134,7 +134,7 @@ pub fn uumain(args: Vec) -> int { for file in files.iter() { if multiple { if !firstime { println!(""); } - println!("==> {:s} <==", file.as_slice()); + println!("==> {} <==", file.as_slice()); } firstime = false; diff --git a/src/timeout/timeout.rs b/src/timeout/timeout.rs index 349ba26fa..1f59c6ac2 100644 --- a/src/timeout/timeout.rs +++ b/src/timeout/timeout.rs @@ -63,7 +63,7 @@ Usage: println!("{} v{}", NAME, VERSION); } else if matches.free.len() < 2 { show_error!("missing an argument"); - show_error!("for help, try '{0:s} --help'", program); + show_error!("for help, try '{0} --help'", program); return ERR_EXIT_STATUS; } else { let status = matches.opt_present("preserve-status"); diff --git a/src/touch/touch.rs b/src/touch/touch.rs index 4de7bacb2..f6ec1929c 100644 --- a/src/touch/touch.rs +++ b/src/touch/touch.rs @@ -45,16 +45,16 @@ pub fn uumain(args: Vec) -> int { }; if matches.opt_present("version") { - println!("{:s} {:s}", NAME, VERSION); + println!("{} {}", NAME, VERSION); return 0; } if matches.opt_present("help") || matches.free.is_empty() { - println!("{:s} {:s}", NAME, VERSION); + println!("{} {}", NAME, VERSION); println!(""); - println!("Usage: {:s} [OPTION]... FILE...", NAME); + println!("Usage: {} [OPTION]... FILE...", NAME); println!(""); - println!("{:s}", getopts::usage("Update the access and modification times of \ + println!("{}", getopts::usage("Update the access and modification times of \ each FILE to the current time.", &opts)); if matches.free.is_empty() { return 1; diff --git a/src/truncate/truncate.rs b/src/truncate/truncate.rs index e52bd61d5..9637043fe 100644 --- a/src/truncate/truncate.rs +++ b/src/truncate/truncate.rs @@ -55,7 +55,7 @@ pub fn uumain(args: Vec) -> int { println!("truncate 1.0.0"); println!(""); println!("Usage:"); - println!(" {0:s} [OPTION]... FILE...", program); + println!(" {0} [OPTION]... FILE...", program); println!(""); print!("{}", getopts::usage("Shrink or extend the size of each file to the specified size.", &opts)); print!(" diff --git a/src/uname/uname.rs b/src/uname/uname.rs index 6d765a8c2..168b21d9d 100644 --- a/src/uname/uname.rs +++ b/src/uname/uname.rs @@ -72,7 +72,7 @@ pub fn uumain(args: Vec) -> int { println!("uname 1.0.0"); println!(""); println!("Usage:"); - println!(" {:s}", program); + println!(" {}", program); println!(""); print(getopts::usage("The uname utility writes symbols representing one or more system characteristics to the standard output.", &opts).as_slice()); return 0; diff --git a/src/unexpand/unexpand.rs b/src/unexpand/unexpand.rs index 12ffd573f..507252f80 100644 --- a/src/unexpand/unexpand.rs +++ b/src/unexpand/unexpand.rs @@ -90,7 +90,7 @@ pub fn uumain(args: Vec) -> int { }; if matches.opt_present("help") { - println!("Usage: {:s} [OPTION]... [FILE]...", NAME); + println!("Usage: {} [OPTION]... [FILE]...", NAME); io::print(getopts::usage( "Convert blanks in each FILE to tabs, writing to standard output.\n\ With no FILE, or when FILE is -, read standard input.", &opts).as_slice()); @@ -142,14 +142,14 @@ fn unexpandspan(output: &mut io::LineBufferedWriter, loop { match to_next_stop(tabstops, cur) { Some(to_next) if cur + to_next <= col => { - safe_write!(output, "{:c}", '\t'); + safe_write!(output, "{}", '\t'); cur += to_next; } _ => break } } } - safe_write!(output, "{:1$s}", "", col - cur); + safe_write!(output, "{:1$}", "", col - cur); } fn unexpand(options: Options) { @@ -167,7 +167,7 @@ fn unexpand(options: Options) { nspaces += 1; } else { nspaces = 0; - safe_write!(output, "{:c}", ' '); + safe_write!(output, "{}", ' '); } col += 1; } @@ -175,7 +175,7 @@ fn unexpand(options: Options) { if is_tabstop(ts, col) { nspaces = 0; col += 1; - safe_write!(output, "{:c}", '\t'); + safe_write!(output, "{}", '\t'); } match to_next_stop(ts, col) { Some(to_next) => { @@ -186,7 +186,7 @@ fn unexpand(options: Options) { col += 1; unexpandspan(&mut output, ts, nspaces, col, init); nspaces = 0; - safe_write!(output, "{:c}", '\t'); + safe_write!(output, "{}", '\t'); } } } @@ -197,7 +197,7 @@ fn unexpand(options: Options) { nspaces = 0; if col > 0 { col -= 1; } init = false; - safe_write!(output, "{:c}", '\x08'); + safe_write!(output, "{}", '\x08'); } Ok('\n') => { if init || options.aflag { @@ -206,7 +206,7 @@ fn unexpand(options: Options) { nspaces = 0; col = 0; init = true; - safe_write!(output, "{:c}", '\n'); + safe_write!(output, "{}", '\n'); } Ok(c) => { if init || options.aflag { @@ -215,7 +215,7 @@ fn unexpand(options: Options) { nspaces = 0; col += 1; init = false; - safe_write!(output, "{:c}", c); + safe_write!(output, "{}", c); } Err(_) => break } diff --git a/src/uniq/uniq.rs b/src/uniq/uniq.rs index 1a6aa5427..d082e6712 100644 --- a/src/uniq/uniq.rs +++ b/src/uniq/uniq.rs @@ -147,7 +147,7 @@ pub fn uumain(args: Vec) -> int { println!("{} {}", NAME, VERSION); println!(""); println!("Usage:"); - println!(" {0:s} [OPTION]... [FILE]...", program); + println!(" {0} [OPTION]... [FILE]...", program); println!(""); print!("{}", getopts::usage("Filter adjacent matching lines from INPUT (or standard input),\n\ writing to OUTPUT (or standard output).", &opts)); diff --git a/src/unlink/unlink.rs b/src/unlink/unlink.rs index 773be53a6..899aa989e 100644 --- a/src/unlink/unlink.rs +++ b/src/unlink/unlink.rs @@ -43,7 +43,7 @@ pub fn uumain(args: Vec) -> int { println!("unlink 1.0.0"); println!(""); println!("Usage:"); - println!(" {0:s} [FILE]... [OPTION]...", program); + println!(" {0} [FILE]... [OPTION]...", program); println!(""); print(getopts::usage("Unlink the file at [FILE].", &opts).as_slice()); return 0; @@ -55,9 +55,9 @@ pub fn uumain(args: Vec) -> int { } if matches.free.len() == 0 { - crash!(1, "missing operand\nTry '{0:s} --help' for more information.", program); + crash!(1, "missing operand\nTry '{0} --help' for more information.", program); } else if matches.free.len() > 1 { - crash!(1, "extra operand: '{1}'\nTry '{0:s} --help' for more information.", program, matches.free[1]); + crash!(1, "extra operand: '{1}'\nTry '{0} --help' for more information.", program, matches.free[1]); } let path = Path::new(matches.free[0].clone()); diff --git a/src/uptime/uptime.rs b/src/uptime/uptime.rs index be4b1dbe2..488c27543 100644 --- a/src/uptime/uptime.rs +++ b/src/uptime/uptime.rs @@ -68,7 +68,7 @@ pub fn uumain(args: Vec) -> int { } if matches.opt_present("help") || matches.free.len() > 0 { println!("Usage:"); - println!(" {0:s} [OPTION]", program); + println!(" {0} [OPTION]", program); println!(""); print(getopts::usage("Print the current time, the length of time the system has been up,\n\ the number of users on the system, and the average number of jobs\n\ @@ -96,7 +96,7 @@ fn print_loadavg() { else { print!("load average: ") for n in range(0, loads) { - print!("{:.2f}{}", avg[n as uint], if n == loads - 1 { "\n" } + print!("{:.2}{}", avg[n as uint], if n == loads - 1 { "\n" } else { ", " } ); } } @@ -153,7 +153,7 @@ fn print_time() { if local_time.tm_hour >= 0 && local_time.tm_min >= 0 && local_time.tm_sec >= 0 { - print!(" {:02d}:{:02d}:{:02d} ", local_time.tm_hour, + print!(" {:02}:{:02}:{:02} ", local_time.tm_hour, local_time.tm_min, local_time.tm_sec); } } @@ -187,12 +187,12 @@ fn print_uptime(upsecs: i64) { let uphours = (upsecs - (updays * 86400)) / 3600; let upmins = (upsecs - (updays * 86400) - (uphours * 3600)) / 60; if updays == 1 { - print!("up {:1d} day, {:2d}:{:02d}, ", updays, uphours, upmins); + print!("up {:1} day, {:2}:{:02}, ", updays, uphours, upmins); } else if updays > 1 { - print!("up {:1d} days, {:2d}:{:02d}, ", updays, uphours, upmins); + print!("up {:1} days, {:2}:{:02}, ", updays, uphours, upmins); } else { - print!("up {:2d}:{:02d}, ", uphours, upmins); + print!("up {:2}:{:02}, ", uphours, upmins); } } diff --git a/src/users/users.rs b/src/users/users.rs index f97aa9628..8994e9e1f 100644 --- a/src/users/users.rs +++ b/src/users/users.rs @@ -68,7 +68,7 @@ pub fn uumain(args: Vec) -> int { println!("users 1.0.0"); println!(""); println!("Usage:"); - println!(" {:s} [OPTION]... [FILE]", program); + println!(" {} [OPTION]... [FILE]", program); println!(""); print(getopts::usage("Output who is currently logged in according to FILE.", &opts).as_slice()); return 0; diff --git a/src/wc/wc.rs b/src/wc/wc.rs index 1b2b59a55..d1eff4ec8 100644 --- a/src/wc/wc.rs +++ b/src/wc/wc.rs @@ -56,7 +56,7 @@ pub fn uumain(args: Vec) -> int { if matches.opt_present("help") { println!("Usage:"); - println!(" {0:s} [OPTION]... [FILE]...", program); + println!(" {0} [OPTION]... [FILE]...", program); println!(""); print(getopts::usage("Print newline, word and byte counts for each FILE", &opts).as_slice()); println!(""); diff --git a/src/whoami/whoami.rs b/src/whoami/whoami.rs index e19e585fa..a353eb25d 100644 --- a/src/whoami/whoami.rs +++ b/src/whoami/whoami.rs @@ -80,7 +80,7 @@ pub fn uumain(args: Vec) -> int { println!("whoami 1.0.0"); println!(""); println!("Usage:"); - println!(" {:s}", program); + println!(" {}", program); println!(""); print(getopts::usage("print effective userid", &opts).as_slice()); return 0; @@ -98,6 +98,6 @@ pub fn uumain(args: Vec) -> int { pub fn exec() { unsafe { let username = platform::getusername(); - println!("{:s}", username); + println!("{}", username); } } diff --git a/src/yes/yes.rs b/src/yes/yes.rs index 275ea7241..6f0fbb065 100644 --- a/src/yes/yes.rs +++ b/src/yes/yes.rs @@ -39,7 +39,7 @@ pub fn uumain(args: Vec) -> int { println!("yes 1.0.0"); println!(""); println!("Usage:"); - println!(" {0:s} [STRING]... [OPTION]...", program); + println!(" {0} [STRING]... [OPTION]...", program); println!(""); print(getopts::usage("Repeatedly output a line with all specified STRING(s), or 'y'.", &opts).as_slice()); return 0; From ab344d8e7c32e924392db4f71431bbdfdf3c82cb Mon Sep 17 00:00:00 2001 From: Michael Gehring Date: Sat, 22 Nov 2014 06:53:26 +0100 Subject: [PATCH 4/6] remove references to the native crate --- src/chmod/chmod.rs | 1 - src/nohup/nohup.rs | 1 - 2 files changed, 2 deletions(-) diff --git a/src/chmod/chmod.rs b/src/chmod/chmod.rs index 6faf93b6b..de8ae0c7d 100644 --- a/src/chmod/chmod.rs +++ b/src/chmod/chmod.rs @@ -15,7 +15,6 @@ extern crate getopts; extern crate libc; -extern crate native; extern crate regex; #[phase(plugin)] extern crate regex_macros; diff --git a/src/nohup/nohup.rs b/src/nohup/nohup.rs index 4aa839671..e044d4234 100644 --- a/src/nohup/nohup.rs +++ b/src/nohup/nohup.rs @@ -12,7 +12,6 @@ #![feature(macro_rules)] extern crate getopts; extern crate libc; -extern crate native; use getopts::{optflag, getopts, usage}; use std::io::stdio::{stdin_raw, stdout_raw, stderr_raw}; From 2027a7a981b5f9f34a43191032cbc52805a42127 Mon Sep 17 00:00:00 2001 From: Michael Gehring Date: Sat, 22 Nov 2014 07:27:54 +0100 Subject: [PATCH 5/6] fix *write*! macro args --- src/cat/cat.rs | 2 +- src/common/util.rs | 4 ++-- src/env/env.rs | 4 ++-- src/expand/expand.rs | 8 ++++---- src/tty/tty.rs | 2 +- src/unexpand/unexpand.rs | 18 +++++++++--------- 6 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/cat/cat.rs b/src/cat/cat.rs index f91862af4..a6b19faf6 100644 --- a/src/cat/cat.rs +++ b/src/cat/cat.rs @@ -284,7 +284,7 @@ fn open(path: &str) -> Option<(Box, bool)> { match File::open(&std::path::Path::new(path)) { Ok(f) => Some((box f as Box, false)), Err(e) => { - (writeln!(stderr(), "cat: {0}: {1}", path, e.to_string())).unwrap(); + (writeln!(&mut stderr(), "cat: {0}: {1}", path, e.to_string())).unwrap(); None }, } diff --git a/src/common/util.rs b/src/common/util.rs index 88e5add24..8531a5aa3 100644 --- a/src/common/util.rs +++ b/src/common/util.rs @@ -88,7 +88,7 @@ macro_rules! return_if_err( #[macro_export] macro_rules! pipe_print( ($($args:expr),+) => ( - match write!(&mut ::std::io::stdout() as &mut Writer, $($args),+) { + match write!(&mut ::std::io::stdout(), $($args),+) { Ok(_) => true, Err(f) => { if f.kind == ::std::io::BrokenPipe { @@ -104,7 +104,7 @@ macro_rules! pipe_print( #[macro_export] macro_rules! pipe_println( ($($args:expr),+) => ( - match writeln!(&mut ::std::io::stdout() as &mut Writer, $($args),+) { + match writeln!(&mut ::std::io::stdout(), $($args),+) { Ok(_) => true, Err(f) => { if f.kind == ::std::io::BrokenPipe { diff --git a/src/env/env.rs b/src/env/env.rs index e5cb91f24..b8c739384 100644 --- a/src/env/env.rs +++ b/src/env/env.rs @@ -181,8 +181,8 @@ pub fn uumain(args: Vec) -> int { } } - for ref name in opts.unsets.iter() { - std::os::unsetenv(name.as_slice()) + for name in opts.unsets.iter() { + std::os::unsetenv((name).as_slice()) } for &(ref name, ref val) in opts.sets.iter() { diff --git a/src/expand/expand.rs b/src/expand/expand.rs index e93d0b5a5..bcaa121fb 100644 --- a/src/expand/expand.rs +++ b/src/expand/expand.rs @@ -139,26 +139,26 @@ fn expand(options: Options) { Ok('\t') if init || !options.iflag => { let nb_spaces = to_next_stop(options.tabstops.as_slice(), col); col += nb_spaces; - safe_write!(output, "{:1$}", "", nb_spaces); + safe_write!(&mut output, "{:1$}", "", nb_spaces); } Ok('\x08') => { if col > 0 { col -= 1; } init = false; - safe_write!(output, "{}", '\x08'); + safe_write!(&mut output, "{}", '\x08'); } Ok('\n') => { col = 0; init = true; - safe_write!(output, "{}", '\n'); + safe_write!(&mut output, "{}", '\n'); } Ok(c) => { col += 1; if c != ' ' { init = false; } - safe_write!(output, "{}", c); + safe_write!(&mut output, "{}", c); } Err(_) => break } diff --git a/src/tty/tty.rs b/src/tty/tty.rs index 03103b554..2c10ba34a 100644 --- a/src/tty/tty.rs +++ b/src/tty/tty.rs @@ -72,5 +72,5 @@ pub fn uumain(args: Vec) -> int { } fn usage () { - safe_writeln!(&mut stderr() as &mut Writer, "usage: tty [-s]"); + safe_writeln!(&mut stderr(), "usage: tty [-s]"); } diff --git a/src/unexpand/unexpand.rs b/src/unexpand/unexpand.rs index 507252f80..8ae3c14a9 100644 --- a/src/unexpand/unexpand.rs +++ b/src/unexpand/unexpand.rs @@ -135,21 +135,21 @@ fn to_next_stop(tabstops: &[uint], col: uint) -> Option { } } -fn unexpandspan(output: &mut io::LineBufferedWriter, +fn unexpandspan(mut output: &mut io::LineBufferedWriter, tabstops: &[uint], nspaces: uint, col: uint, init: bool) { let mut cur = col - nspaces; if nspaces > 1 || init { loop { match to_next_stop(tabstops, cur) { Some(to_next) if cur + to_next <= col => { - safe_write!(output, "{}", '\t'); + safe_write!(&mut output, "{}", '\t'); cur += to_next; } _ => break } } } - safe_write!(output, "{:1$}", "", col - cur); + safe_write!(&mut output, "{:1$}", "", col - cur); } fn unexpand(options: Options) { @@ -167,7 +167,7 @@ fn unexpand(options: Options) { nspaces += 1; } else { nspaces = 0; - safe_write!(output, "{}", ' '); + safe_write!(&mut output, "{}", ' '); } col += 1; } @@ -175,7 +175,7 @@ fn unexpand(options: Options) { if is_tabstop(ts, col) { nspaces = 0; col += 1; - safe_write!(output, "{}", '\t'); + safe_write!(&mut output, "{}", '\t'); } match to_next_stop(ts, col) { Some(to_next) => { @@ -186,7 +186,7 @@ fn unexpand(options: Options) { col += 1; unexpandspan(&mut output, ts, nspaces, col, init); nspaces = 0; - safe_write!(output, "{}", '\t'); + safe_write!(&mut output, "{}", '\t'); } } } @@ -197,7 +197,7 @@ fn unexpand(options: Options) { nspaces = 0; if col > 0 { col -= 1; } init = false; - safe_write!(output, "{}", '\x08'); + safe_write!(&mut output, "{}", '\x08'); } Ok('\n') => { if init || options.aflag { @@ -206,7 +206,7 @@ fn unexpand(options: Options) { nspaces = 0; col = 0; init = true; - safe_write!(output, "{}", '\n'); + safe_write!(&mut output, "{}", '\n'); } Ok(c) => { if init || options.aflag { @@ -215,7 +215,7 @@ fn unexpand(options: Options) { nspaces = 0; col += 1; init = false; - safe_write!(output, "{}", c); + safe_write!(&mut output, "{}", c); } Err(_) => break } From 3b24dc87875dda8f003d6b1d20a2cb1825fdbbf6 Mon Sep 17 00:00:00 2001 From: Michael Gehring Date: Sat, 22 Nov 2014 07:40:58 +0100 Subject: [PATCH 6/6] Update rust-crypto --- deps/rust-crypto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deps/rust-crypto b/deps/rust-crypto index 2fcd4c81d..bd7b061e7 160000 --- a/deps/rust-crypto +++ b/deps/rust-crypto @@ -1 +1 @@ -Subproject commit 2fcd4c81de3f04c95d69af03d731dae3de7ae301 +Subproject commit bd7b061e7e22864352e29d6fe453842727916ce8