mirror of
https://github.com/uutils/coreutils
synced 2024-12-14 15:22:38 +00:00
du,stty: replace deprecated is_present()
This commit is contained in:
parent
6d5d6f2bb6
commit
8cae763321
2 changed files with 4 additions and 4 deletions
|
@ -501,7 +501,7 @@ fn build_exclude_patterns(matches: &ArgMatches) -> UResult<Vec<Pattern>> {
|
|||
|
||||
let mut exclude_patterns = Vec::new();
|
||||
for f in excludes_iterator.chain(exclude_from_iterator) {
|
||||
if matches.is_present(options::VERBOSE) {
|
||||
if matches.contains_id(options::VERBOSE) {
|
||||
println!("adding {:?} to the exclude list ", &f);
|
||||
}
|
||||
match parse_glob::from_str(&f) {
|
||||
|
@ -637,7 +637,7 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> {
|
|||
continue;
|
||||
}
|
||||
|
||||
if matches.is_present(options::TIME) {
|
||||
if matches.contains_id(options::TIME) {
|
||||
let tm = {
|
||||
let secs = {
|
||||
match matches.get_one::<String>(options::TIME) {
|
||||
|
|
|
@ -100,8 +100,8 @@ struct Options<'a> {
|
|||
impl<'a> Options<'a> {
|
||||
fn from(matches: &'a ArgMatches) -> io::Result<Self> {
|
||||
Ok(Self {
|
||||
all: matches.is_present(options::ALL),
|
||||
save: matches.is_present(options::SAVE),
|
||||
all: matches.contains_id(options::ALL),
|
||||
save: matches.contains_id(options::SAVE),
|
||||
file: match matches.get_one::<String>(options::FILE) {
|
||||
Some(_f) => todo!(),
|
||||
None => stdout().as_raw_fd(),
|
||||
|
|
Loading…
Reference in a new issue