use rand::prelude::*; use rand::{thread_rng}; const FIRSTS: [&'static str; 22] = [ "fierce", "obscure", "mighty", "rogue", "inverted", "recalcitrant", "subterranean", "brewing", "nocturnal", "convex", "concave", "piscine", "dub", "borean", "lurking", "leafy", "nutritious", "bristling", "metallic", "purified", "organic", "distorted", ]; const LASTS: [&'static str; 29] = [ "kaffe", "foilage", "wildlife", "design", "assembly", "layout", "transmitter", "lens", "artifact", "frequency", "entropy", "console", "insulator", "river", "oak", "replicant", "mechanism", "construct", "function", "shape", "form", "poseidon", "mountain", "river", "forest", "problem", "warning", "information", "witness", ]; pub fn name() -> String { let mut rng = thread_rng(); let first = rng.gen_range(0, FIRSTS.len() - 1); let last = rng.gen_range(0, LASTS.len() - 1); let mut s = String::new(); s.push_str(FIRSTS[first]); s.push(' '); s.push_str(LASTS[last]); s }