From d1f594eb68a100f09ff06470bc3c4dbd83147d2b Mon Sep 17 00:00:00 2001 From: kwantam Date: Tue, 28 Apr 2015 17:51:13 -0400 Subject: [PATCH] remove box_syntax feature from `fmt`, `base64`, `cat` --- src/base64/base64.rs | 6 +++--- src/cat/cat.rs | 6 +++--- src/fmt/fmt.rs | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/base64/base64.rs b/src/base64/base64.rs index 09987361a..d50cc4770 100644 --- a/src/base64/base64.rs +++ b/src/base64/base64.rs @@ -1,5 +1,5 @@ #![crate_name = "base64"] -#![feature(box_syntax, rustc_private)] +#![feature(rustc_private)] /* * This file is part of the uutils coreutils package. @@ -80,11 +80,11 @@ pub fn uumain(args: Vec) -> i32 { let mut file_buf; let mut input = if matches.free.is_empty() || &matches.free[0][..] == "-" { stdin_buf = stdin(); - BufReader::new(box stdin_buf as Box) + BufReader::new(Box::new(stdin_buf) as Box) } else { let path = Path::new(&matches.free[0][..]); file_buf = safe_unwrap!(File::open(&path)); - BufReader::new(box file_buf as Box) + BufReader::new(Box::new(file_buf) as Box) }; match mode { diff --git a/src/cat/cat.rs b/src/cat/cat.rs index dfea5d71c..37aa9dd9c 100644 --- a/src/cat/cat.rs +++ b/src/cat/cat.rs @@ -1,5 +1,5 @@ #![crate_name = "cat"] -#![feature(rustc_private, box_syntax, unsafe_destructor)] +#![feature(rustc_private, unsafe_destructor)] /* * This file is part of the uutils coreutils package. @@ -261,11 +261,11 @@ fn open(path: &str) -> Option<(Box, bool)> { if path == "-" { let stdin = stdin(); let interactive = unsafe { isatty(STDIN_FILENO) } != 0 as c_int; - return Some((box stdin as Box, interactive)); + return Some((Box::new(stdin) as Box, interactive)); } match File::open(path) { - Ok(f) => Some((box f as Box, false)), + Ok(f) => Some((Box::new(f) as Box, false)), Err(e) => { (writeln!(&mut stderr(), "cat: {0}: {1}", path, e.to_string())).unwrap(); None diff --git a/src/fmt/fmt.rs b/src/fmt/fmt.rs index 7edae633f..72db42444 100644 --- a/src/fmt/fmt.rs +++ b/src/fmt/fmt.rs @@ -1,5 +1,5 @@ #![crate_name = "fmt"] -#![feature(box_syntax,rustc_private,str_char,unicode,core)] +#![feature(rustc_private,str_char,unicode,core)] /* * This file is part of `fmt` from the uutils coreutils package. @@ -197,9 +197,9 @@ pub fn uumain(args: Vec) -> i32 { for i in files.iter().map(|x| &x[..]) { let mut fp = match i { - "-" => BufReader::new(box stdin() as Box), + "-" => BufReader::new(Box::new(stdin()) as Box), _ => match File::open(i) { - Ok(f) => BufReader::new(box f as Box), + Ok(f) => BufReader::new(Box::new(f) as Box), Err(e) => { show_warning!("{}: {}", i, e); continue;