Skip to content

Commit

Permalink
fix(usage): remove warning about unused variables
Browse files Browse the repository at this point in the history
  • Loading branch information
kbknapp committed Apr 9, 2015
1 parent be91c5f commit ba817b9
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -460,21 +460,21 @@ impl<'a, 'v, 'ab, 'u, 'ar> App<'a, 'v, 'ab, 'u, 'ar>{
if opts {
write!(&mut usage," {}",
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() {
" [OPTIONS]".to_owned()
"[OPTIONS]".to_owned()
} else {
req_opts
format!("{}", &req_opts[..])
});
}
if pos {
write!(&mut usage, " {}",
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() {
" [POSITIONAL]".to_owned()
"[POSITIONAL]".to_owned()
} else {
req_pos
format!("{}", &req_pos[..])
} );
}
if subcmds {
Expand Down

0 comments on commit ba817b9

Please sign in to comment.