mirror of
https://github.com/clap-rs/clap
synced 2024-12-14 14:52:33 +00:00
Fix clippy
This commit is contained in:
parent
ad3d3a13cd
commit
53fdc9d6b2
1 changed files with 7 additions and 9 deletions
|
@ -1593,8 +1593,7 @@ impl<'help, 'app> Parser<'help, 'app> {
|
||||||
for a in self.app.args.args.iter() {
|
for a in self.app.args.args.iter() {
|
||||||
// Use env only if the arg was not present among command line args
|
// Use env only if the arg was not present among command line args
|
||||||
if matcher.get(&a.id).map_or(true, |a| a.occurs == 0) {
|
if matcher.get(&a.id).map_or(true, |a| a.occurs == 0) {
|
||||||
if let Some((_, ref val)) = a.env {
|
if let Some((_, Some(ref val))) = a.env {
|
||||||
if let Some(ref val) = val {
|
|
||||||
let val = &ArgStr::new(val);
|
let val = &ArgStr::new(val);
|
||||||
if a.is_set(ArgSettings::TakesValue) {
|
if a.is_set(ArgSettings::TakesValue) {
|
||||||
self.add_val_to_arg(a, val, matcher, ValueType::EnvVariable)?;
|
self.add_val_to_arg(a, val, matcher, ValueType::EnvVariable)?;
|
||||||
|
@ -1605,7 +1604,6 @@ impl<'help, 'app> Parser<'help, 'app> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue