mirror of
https://github.com/ProvableHQ/leo.git
synced 2024-11-28 01:01:53 +03:00
Simplify the code
This commit is contained in:
parent
0495fc90c3
commit
e09df32666
@ -33,11 +33,7 @@ impl CLI for NewCommand {
|
||||
|
||||
#[cfg_attr(tarpaulin, skip)]
|
||||
fn parse(arguments: &ArgMatches) -> Result<Self::Options, CLIError> {
|
||||
let mut is_lib = false;
|
||||
if arguments.is_present("lib") {
|
||||
is_lib = true;
|
||||
}
|
||||
|
||||
let is_lib = arguments.is_present("lib");
|
||||
match arguments.value_of("NAME") {
|
||||
Some(name) => Ok((Some(name.to_string()), is_lib)),
|
||||
None => Ok((None, is_lib)),
|
||||
|
Loading…
Reference in New Issue
Block a user