diff --git a/src/expand/expand.rs b/src/expand/expand.rs index dbd90f14d..8c32490e4 100644 --- a/src/expand/expand.rs +++ b/src/expand/expand.rs @@ -105,7 +105,7 @@ pub fn uumain(args: Vec) -> int { return 0; } -fn open(path: String) -> io::BufferedReader> { +fn open(path: String) -> io::BufferedReader> { let mut file_buf; if path.as_slice() == "-" { io::BufferedReader::new(box io::stdio::stdin_raw() as Box) diff --git a/src/hashsum/hashsum.rs b/src/hashsum/hashsum.rs index 7557eb54f..7df564448 100644 --- a/src/hashsum/hashsum.rs +++ b/src/hashsum/hashsum.rs @@ -59,7 +59,7 @@ fn get_algo_opts(program: &str) -> Vec { } } -fn detect_algo(program: &str, matches: &getopts::Matches) -> (&'static str, Box) { +fn detect_algo(program: &str, matches: &getopts::Matches) -> (&'static str, Box) { let mut alg: Option> = None; let mut name: &'static str = ""; match program { @@ -71,7 +71,7 @@ fn detect_algo(program: &str, matches: &getopts::Matches) -> (&'static str, Box< "sha512sum" => ("SHA512", box Sha512::new() as Box), _ => { { - let set_or_crash = |n: &'static str, val: Box| -> () { + let set_or_crash = |n, val| -> () { if alg.is_some() { crash!(1, "You cannot combine multiple hash algorithms!") }; name = n; alg = Some(val); diff --git a/src/unexpand/unexpand.rs b/src/unexpand/unexpand.rs index 47fd813eb..1c13edd15 100644 --- a/src/unexpand/unexpand.rs +++ b/src/unexpand/unexpand.rs @@ -107,7 +107,7 @@ pub fn uumain(args: Vec) -> int { return 0; } -fn open(path: String) -> io::BufferedReader> { +fn open(path: String) -> io::BufferedReader> { let mut file_buf; if path.as_slice() == "-" { io::BufferedReader::new(box io::stdio::stdin_raw() as Box) diff --git a/src/uniq/uniq.rs b/src/uniq/uniq.rs index db63bcd08..e95961666 100644 --- a/src/uniq/uniq.rs +++ b/src/uniq/uniq.rs @@ -190,7 +190,7 @@ pub fn uumain(args: Vec) -> int { 0 } -fn open_input_file(in_file_name: String) -> io::BufferedReader> { +fn open_input_file(in_file_name: String) -> io::BufferedReader> { let in_file = if in_file_name.as_slice() == "-" { box io::stdio::stdin_raw() as Box } else { @@ -201,7 +201,7 @@ fn open_input_file(in_file_name: String) -> io::BufferedReader> { io::BufferedReader::new(in_file) } -fn open_output_file(out_file_name: String) -> io::BufferedWriter> { +fn open_output_file(out_file_name: String) -> io::BufferedWriter> { let out_file = if out_file_name.as_slice() == "-" { box io::stdio::stdout_raw() as Box } else { diff --git a/src/wc/wc.rs b/src/wc/wc.rs index 4877c9930..a6cb9499d 100644 --- a/src/wc/wc.rs +++ b/src/wc/wc.rs @@ -230,7 +230,7 @@ fn print_stats(filename: &str, line_count: uint, word_count: uint, char_count: u } } -fn open(path: String) -> StdResult>, int> { +fn open(path: String) -> StdResult>, int> { if "-" == path.as_slice() { let reader = box stdin_raw() as Box; return Ok(BufferedReader::new(reader));