mirror of
https://github.com/uutils/coreutils.git
synced 2026-06-10 15:48:22 -07:00
du,stty: replace deprecated is_present()
This commit is contained in:
+2
-2
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user