mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-08-02 05:57:46 +00:00
remove box_syntax feature from fmt
, base64
, cat
This commit is contained in:
parent
baaa96a871
commit
d1f594eb68
3 changed files with 9 additions and 9 deletions
|
@ -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<String>) -> 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<Read+'static>)
|
||||
BufReader::new(Box::new(stdin_buf) as Box<Read+'static>)
|
||||
} else {
|
||||
let path = Path::new(&matches.free[0][..]);
|
||||
file_buf = safe_unwrap!(File::open(&path));
|
||||
BufReader::new(box file_buf as Box<Read+'static>)
|
||||
BufReader::new(Box::new(file_buf) as Box<Read+'static>)
|
||||
};
|
||||
|
||||
match mode {
|
||||
|
|
|
@ -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<Read>, bool)> {
|
|||
if path == "-" {
|
||||
let stdin = stdin();
|
||||
let interactive = unsafe { isatty(STDIN_FILENO) } != 0 as c_int;
|
||||
return Some((box stdin as Box<Read>, interactive));
|
||||
return Some((Box::new(stdin) as Box<Read>, interactive));
|
||||
}
|
||||
|
||||
match File::open(path) {
|
||||
Ok(f) => Some((box f as Box<Read>, false)),
|
||||
Ok(f) => Some((Box::new(f) as Box<Read>, false)),
|
||||
Err(e) => {
|
||||
(writeln!(&mut stderr(), "cat: {0}: {1}", path, e.to_string())).unwrap();
|
||||
None
|
||||
|
|
|
@ -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<String>) -> i32 {
|
|||
|
||||
for i in files.iter().map(|x| &x[..]) {
|
||||
let mut fp = match i {
|
||||
"-" => BufReader::new(box stdin() as Box<Read+'static>),
|
||||
"-" => BufReader::new(Box::new(stdin()) as Box<Read+'static>),
|
||||
_ => match File::open(i) {
|
||||
Ok(f) => BufReader::new(box f as Box<Read+'static>),
|
||||
Ok(f) => BufReader::new(Box::new(f) as Box<Read+'static>),
|
||||
Err(e) => {
|
||||
show_warning!("{}: {}", i, e);
|
||||
continue;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue