mirror of
https://github.com/clap-rs/clap
synced 2024-12-14 23:02:31 +00:00
fix(usage): remove warning about unused variables
This commit is contained in:
parent
be91c5f2f5
commit
ba817b9d81
1 changed files with 6 additions and 6 deletions
12
src/app.rs
12
src/app.rs
|
@ -460,21 +460,21 @@ impl<'a, 'v, 'ab, 'u, 'ar> App<'a, 'v, 'ab, 'u, 'ar>{
|
||||||
if opts {
|
if opts {
|
||||||
write!(&mut usage," {}",
|
write!(&mut usage," {}",
|
||||||
if num_req_opts != self.opts.len() && !req_opts.is_empty() {
|
if num_req_opts != self.opts.len() && !req_opts.is_empty() {
|
||||||
format!(" [OPTIONS] {}", &req_opts[..])
|
format!("[OPTIONS] {}", &req_opts[..])
|
||||||
} else if req_opts.is_empty() {
|
} else if req_opts.is_empty() {
|
||||||
" [OPTIONS]".to_owned()
|
"[OPTIONS]".to_owned()
|
||||||
} else {
|
} else {
|
||||||
req_opts
|
format!("{}", &req_opts[..])
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if pos {
|
if pos {
|
||||||
write!(&mut usage, " {}",
|
write!(&mut usage, " {}",
|
||||||
if num_req_pos != self.positionals_idx.len() && !req_pos.is_empty() {
|
if num_req_pos != self.positionals_idx.len() && !req_pos.is_empty() {
|
||||||
format!(" [POSITIONAL] {}", &req_pos[..])
|
format!("[POSITIONAL] {}", &req_pos[..])
|
||||||
} else if req_pos.is_empty() {
|
} else if req_pos.is_empty() {
|
||||||
" [POSITIONAL]".to_owned()
|
"[POSITIONAL]".to_owned()
|
||||||
} else {
|
} else {
|
||||||
req_pos
|
format!("{}", &req_pos[..])
|
||||||
} );
|
} );
|
||||||
}
|
}
|
||||||
if subcmds {
|
if subcmds {
|
||||||
|
|
Loading…
Reference in a new issue