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:
parent
22ba21d8ab
commit
c930509095
1 changed files with 6 additions and 8 deletions
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue