[rustfmt] Updates simply due to current rustfmt.
Signed-off-by: Fletcher Nichol <fnichol@nichol.ca>
This commit is contained in:
parent
d9dc0eafbf
commit
5d7a18c507
@ -1,4 +1,5 @@
|
|||||||
#[macro_use] extern crate clap;
|
#[macro_use]
|
||||||
|
extern crate clap;
|
||||||
extern crate names;
|
extern crate names;
|
||||||
|
|
||||||
use clap::{App, Arg};
|
use clap::{App, Arg};
|
||||||
@ -6,19 +7,17 @@ use names::{Generator, Name};
|
|||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let matches = App::new("names")
|
let matches = App::new("names")
|
||||||
.version(&crate_version!()[..])
|
.version(&crate_version!()[..])
|
||||||
.author("\nAuthor: Fletcher Nichol <fnichol@nichol.ca>\n")
|
.author("\nAuthor: Fletcher Nichol <fnichol@nichol.ca>\n")
|
||||||
.about("A random name generator with results like `delirious-pail'.")
|
.about("A random name generator with results like `delirious-pail'.")
|
||||||
.arg(Arg::with_name("amount")
|
.arg(Arg::with_name("amount")
|
||||||
.help("Number of names to generate (default: 1)")
|
.help("Number of names to generate (default: 1)")
|
||||||
.index(1)
|
.index(1))
|
||||||
)
|
.arg(Arg::with_name("number")
|
||||||
.arg(Arg::with_name("number")
|
.short("n")
|
||||||
.short("n")
|
.long("number")
|
||||||
.long("number")
|
.help("Adds a random number to the name(s)"))
|
||||||
.help("Adds a random number to the name(s)")
|
.get_matches();
|
||||||
)
|
|
||||||
.get_matches();
|
|
||||||
|
|
||||||
let amount = value_t!(matches.value_of("amount"), usize).unwrap_or(1);
|
let amount = value_t!(matches.value_of("amount"), usize).unwrap_or(1);
|
||||||
let naming: Name = if matches.is_present("number") {
|
let naming: Name = if matches.is_present("number") {
|
||||||
|
Loading…
Reference in New Issue
Block a user