[rustfmt] Updates simply due to current rustfmt.
Signed-off-by: Fletcher Nichol <fnichol@nichol.ca>
This commit is contained in:
parent
129d6830f8
commit
1b1bcfbd94
2250
src/adjectives.rs
2250
src/adjectives.rs
File diff suppressed because it is too large
Load Diff
17
src/lib.rs
17
src/lib.rs
@ -74,11 +74,13 @@ pub enum Name {
|
||||
Plain,
|
||||
/// This represents a naming strategy with a random number appended to the
|
||||
/// end, of the form `"ADJECTIVE-NOUN-NUMBER"`
|
||||
Numbered
|
||||
Numbered,
|
||||
}
|
||||
|
||||
impl Default for Name {
|
||||
fn default() -> Name { Name::Plain }
|
||||
fn default() -> Name {
|
||||
Name::Plain
|
||||
}
|
||||
}
|
||||
|
||||
/// A random name generator which combines an adjective, a noun, and an
|
||||
@ -108,11 +110,7 @@ impl<'a> Generator<'a> {
|
||||
///
|
||||
/// assert_eq!("sassy-clocks", generator.next().unwrap());
|
||||
/// ```
|
||||
pub fn new(
|
||||
adjectives: &'a [&'a str],
|
||||
nouns: &'a [&'a str],
|
||||
naming: Name
|
||||
) -> Generator<'a> {
|
||||
pub fn new(adjectives: &'a [&'a str], nouns: &'a [&'a str], naming: Name) -> Generator<'a> {
|
||||
Generator {
|
||||
adjectives: adjectives,
|
||||
nouns: nouns,
|
||||
@ -131,10 +129,7 @@ impl<'a> Generator<'a> {
|
||||
/// println!("My new name is: {}", generator.next().unwrap());
|
||||
/// ```
|
||||
pub fn with_naming(naming: Name) -> Generator<'a> {
|
||||
Generator::new(
|
||||
adjectives::LIST,
|
||||
nouns::LIST,
|
||||
naming)
|
||||
Generator::new(adjectives::LIST, nouns::LIST, naming)
|
||||
}
|
||||
|
||||
fn rand_adj(&self) -> &str {
|
||||
|
1964
src/nouns.rs
1964
src/nouns.rs
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user