1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-08-02 14:07:46 +00:00

Fix clippy warning

This commit is contained in:
Arijit Dey 2021-05-16 22:30:46 +05:30
parent 22ba21d8ab
commit c930509095
No known key found for this signature in database
GPG key ID: 2F7AC644CE7E007D

View file

@ -162,15 +162,13 @@ pub fn uumain(args: impl uucore::Args) -> i32 {
buff.clear(); buff.clear();
} }
reset_term(&mut stdout); reset_term(&mut stdout);
} else if atty::isnt(atty::Stream::Stdin) {
let mut stdout = setup_term();
stdin().read_to_string(&mut buff).unwrap();
more(&buff, &mut stdout, true);
} else { } else {
if atty::isnt(atty::Stream::Stdin) { terminal::disable_raw_mode().unwrap();
let mut stdout = setup_term(); show_usage_error!("bad usage");
stdin().read_to_string(&mut buff).unwrap();
more(&buff, &mut stdout, true);
} else {
terminal::disable_raw_mode().unwrap();
show_usage_error!("bad usage");
}
} }
0 0
} }