const ADJECTIVES: &[&str] = &[
"absurd",
"accommodating",
"accomplished",
"acrobatic",
"active",
"adamant",
"adaptable",
"adept",
"admirable",
"admiring",
"adorable",
"adoring",
"adventurous",
"affable",
"affectionate",
"agile",
"agitated",
"agreeable",
"alert",
"alluring",
"aloof",
"amazing",
"ambitious",
"amiable",
"amicable",
"amorous",
"amused",
"amusing",
"animated",
"anxious",
"apologetic",
"appreciative",
"ardent",
"argumentative",
"arrogant",
"artful",
"articulate",
"artistic",
"assertive",
"astonished",
"astounding",
"astute",
"athletic",
"atomic",
"attentive",
"audacious",
"authentic",
"avid",
"awesome",
"awkward",
"azure",
"babbling",
"baffled",
"baking",
"ballooning",
"balmy",
"bashful",
"beaming",
"bearded",
"beautiful",
"beguiling",
"belligerent",
"beloved",
"benevolent",
"bewildered",
"bickering",
"bionic",
"bizarre",
"blinking",
"blissful",
"blushing",
"boastful",
"bohemian",
"boisterous",
"bold",
"bombastic",
"bonkers",
"bossy",
"bouncy",
"bountiful",
"bowling",
"brainy",
"brash",
"brave",
"brazen",
"breathless",
"breezy",
"bright",
"brilliant",
"brisk",
"bubbly",
"bulky",
"bumbling",
"buoyant",
"bushy",
"busy",
"cackling",
"caffeinated",
"calm",
"candid",
"capable",
"capricious",
"captivating",
"carefree",
"careful",
"caring",
"casual",
"cautious",
"cavalier",
"celebrated",
"cerebral",
"chaotic",
"charismatic",
"charming",
"chattering",
"chatty",
"cheeky",
"cheerful",
"cheery",
"cheesy",
"chic",
"chilly",
"chipper",
"chivalrous",
"chubby",
"chuckling",
"chunky",
"civil",
"clapping",
"classy",
"clever",
"clingy",
"cloudy",
"clueless",
"clumsy",
"cocky",
"collected",
"colorful",
"comfy",
"comical",
"commanding",
"compassionate",
"composed",
"conceited",
"confident",
"confounded",
"confused",
"congenial",
"conscientious",
"considerate",
"contemplative",
"content",
"contrary",
"cool",
"cordial",
"cosmic",
"courageous",
"courteous",
"covert",
"coy",
"cozy",
"crackpot",
"crafty",
"cranky",
"crazy",
"creative",
"crimson",
"crowned",
"crusty",
"cryptic",
"cuddly",
"cultured",
"cunning",
"curious",
"cute",
"cynical",
"daffy",
"dainty",
"dancing",
"dandy",
"dapper",
"daring",
"dashing",
"dauntless",
"daydreaming",
"dazed",
"dazzling",
"decisive",
"dedicated",
"defiant",
"deft",
"delighted",
"delightful",
"delirious",
"demure",
"dependable",
"determined",
"devilish",
"devious",
"devoted",
"diabolical",
"dignified",
"diligent",
"diplomatic",
"discerning",
"disciplined",
"discreet",
"disgruntled",
"disheveled",
"dismayed",
"distracted",
"dizzy",
"docile",
"dogged",
"doodling",
"dopey",
"doting",
"dotty",
"dozing",
"dramatic",
"dreamy",
"droopy",
"drowsy",
"dubious",
"dusty",
"dutiful",
"dynamic",
"eager",
"earnest",
"easygoing",
"eccentric",
"ecstatic",
"edgy",
"effervescent",
"efficient",
"egotistical",
"elaborate",
"elastic",
"elated",
"electric",
"elegant",
"eloquent",
"elusive",
"embarrassed",
"eminent",
"emotional",
"empathetic",
"enamored",
"enchanted",
"encouraging",
"endearing",
"energetic",
"energized",
"engaging",
"enigmatic",
"enlightened",
"enterprising",
"entertaining",
"enthusiastic",
"envious",
"epic",
"esteemed",
"ethereal",
"euphoric",
"evasive",
"exasperated",
"excitable",
"excited",
"exotic",
"expert",
"expressive",
"exquisite",
"extravagant",
"exuberant",
"fabled",
"fabulous",
"facetious",
"fair",
"faithful",
"famous",
"fanciful",
"fancy",
"fantastic",
"fascinated",
"fashionable",
"fastidious",
"fearless",
"fearsome",
"feathered",
"feisty",
"feral",
"ferocious",
"fervent",
"festive",
"fickle",
"fierce",
"fiery",
"firm",
"fishing",
"flabbergasted",
"flaky",
"flamboyant",
"flappy",
"flashy",
"flawless",
"flippant",
"floppy",
"flourishing",
"fluent",
"fluffy",
"flushed",
"flustered",
"fluttering",
"focused",
"fond",
"foolish",
"forgetful",
"forgiving",
"formal",
"formidable",
"forthright",
"fortunate",
"frank",
"frantic",
"freaky",
"frenzied",
"fresh",
"friendly",
"frightened",
"frilly",
"frisky",
"frivolous",
"frizzy",
"frosty",
"frugal",
"fruity",
"fuming",
"funky",
"funny",
"furious",
"furry",
"fussy",
"futuristic",
"fuzzy",
"gabby",
"galactic",
"gallant",
"gardening",
"gaudy",
"genial",
"genteel",
"gentle",
"genuine",
"ghostly",
"giddy",
"gifted",
"gigantic",
"giggling",
"gilded",
"glad",
"glamorous",
"gleaming",
"glib",
"glistening",
"glittering",
"glittery",
"gloomy",
"glorious",
"glossy",
"glowing",
"gnarly",
"gobsmacked",
"golden",
"good",
"goofy",
"gorgeous",
"gossiping",
"graceful",
"gracious",
"grand",
"grandiose",
"grateful",
"greedy",
"gregarious",
"grinning",
"gritty",
"groggy",
"groovy",
"grouchy",
"grubby",
"gruff",
"grumbling",
"grumpy",
"guarded",
"gullible",
"gushing",
"gusty",
"gutsy",
"haggard",
"hairy",
"handsome",
"handy",
"hapless",
"happy",
"hardworking",
"hardy",
"harmonious",
"hasty",
"haughty",
"hearty",
"heavenly",
"hectic",
"hefty",
"helpful",
"heroic",
"hesitant",
"hilarious",
"hollering",
"honest",
"honorable",
"hopeful",
"hopping",
"hospitable",
"humble",
"humming",
"humorous",
"hungry",
"hurried",
"hushed",
"hyper",
"hypnotic",
"hysterical",
"icy",
"idealistic",
"idle",
"illustrious",
"imaginative",
"immaculate",
"immense",
"impartial",
"impatient",
"impeccable",
"imperious",
"impetuous",
"impressive",
"impulsive",
"incredible",
"indignant",
"indomitable",
"industrious",
"ingenious",
"innocent",
"innovative",
"inquisitive",
"insightful",
"insistent",
"inspired",
"intense",
"intrepid",
"intrigued",
"intuitive",
"inventive",
"invincible",
"irate",
"irresistible",
"irreverent",
"itchy",
"jaded",
"jaunty",
"jazzy",
"jealous",
"jittery",
"jogging",
"jolly",
"jovial",
"joyful",
"joyous",
"jubilant",
"judicious",
"juggling",
"jumbo",
"jumpy",
"keen",
"kind",
"kindly",
"knitting",
"knowing",
"knowledgeable",
"kooky",
"languid",
"lanky",
"laughing",
"lavish",
"lawful",
"lazy",
"leaping",
"learned",
"legendary",
"leisurely",
"lethargic",
"lighthearted",
"likable",
"listless",
"literate",
"lively",
"lofty",
"lonely",
"lonesome",
"loony",
"loopy",
"loud",
"lounging",
"lovable",
"loving",
"loyal",
"lucid",
"lucky",
"ludicrous",
"lumbering",
"luminous",
"lumpy",
"lurking",
"lustrous",
"magical",
"magnanimous",
"magnetic",
"magnificent",
"majestic",
"marching",
"marvelous",
"masterful",
"meandering",
"meditating",
"meditative",
"meek",
"melancholy",
"mellow",
"melodramatic",
"memorable",
"menacing",
"merciful",
"merry",
"mesmerizing",
"messy",
"meticulous",
"mighty",
"mindful",
"miniature",
"mischievous",
"misty",
"modern",
"modest",
"momentous",
"monstrous",
"moody",
"motivated",
"mournful",
"muddled",
"muddy",
"muffled",
"mumbling",
"munching",
"mundane",
"muscular",
"musical",
"musing",
"muttering",
"mysterious",
"mystical",
"mythical",
"naive",
"napping",
"natty",
"naughty",
"nautical",
"neat",
"needy",
"nerdy",
"nervous",
"neurotic",
"nibbling",
"nifty",
"nimble",
"noble",
"nocturnal",
"noisy",
"nomadic",
"nonchalant",
"nostalgic",
"nosy",
"notable",
"notorious",
"nurturing",
"nutty",
"obedient",
"obliging",
"oblivious",
"obnoxious",
"observant",
"obsessive",
"obstinate",
"odd",
"offbeat",
"omnipotent",
"opinionated",
"optimistic",
"opulent",
"orderly",
"organized",
"ornate",
"outgoing",
"outlandish",
"outspoken",
"overjoyed",
"overwhelmed",
"overzealous",
"painstaking",
"panicky",
"paranoid",
"parched",
"passionate",
"patient",
"peaceful",
"peculiar",
"pensive",
"peppy",
"perfect",
"perky",
"perplexed",
"persistent",
"persuasive",
"pert",
"perturbed",
"petite",
"petulant",
"philosophical",
"picky",
"pious",
"placid",
"playful",
"pleasant",
"pleased",
"plotting",
"plucky",
"plump",
"poetic",
"poised",
"polished",
"polite",
"pompous",
"pondering",
"popular",
"posh",
"positive",
"pouting",
"powerful",
"pragmatic",
"prancing",
"precious",
"precise",
"prestigious",
"pretentious",
"pretty",
"prickly",
"prim",
"primal",
"princely",
"prodigious",
"productive",
"profound",
"prolific",
"prominent",
"prompt",
"proper",
"prosperous",
"protective",
"proud",
"prudent",
"puffy",
"punctual",
"pungent",
"puny",
"purple",
"purring",
"pushy",
"puzzled",
"quaint",
"qualified",
"quantum",
"queasy",
"quick",
"quiet",
"quirky",
"quivering",
"radiant",
"radioactive",
"ragged",
"rambling",
"rampaging",
"rare",
"raspy",
"rattled",
"raucous",
"ravenous",
"rebellious",
"reckless",
"refined",
"regal",
"relaxed",
"reliable",
"reluctant",
"remarkable",
"renowned",
"reserved",
"resilient",
"resolute",
"resourceful",
"respectable",
"resplendent",
"responsible",
"restless",
"retired",
"revered",
"rhythmic",
"ridiculous",
"righteous",
"riotous",
"robotic",
"robust",
"romantic",
"rosy",
"rousing",
"rowdy",
"ruffled",
"rugged",
"rustic",
"sailing",
"saintly",
"salty",
"sanguine",
"sarcastic",
"sardonic",
"sassy",
"satisfied",
"saucy",
"savvy",
"scarlet",
"scheming",
"scholarly",
"scintillating",
"scrappy",
"scrawny",
"scruffy",
"scrumptious",
"scurrying",
"secretive",
"sedate",
"selfless",
"sensational",
"sensible",
"sensitive",
"sentimental",
"serene",
"serious",
"shabby",
"shaggy",
"shaky",
"shimmering",
"shiny",
"shivering",
"shocked",
"showy",
"shrewd",
"shrill",
"shuffling",
"shy",
"silly",
"silver",
"sincere",
"singing",
"sizzling",
"skateboarding",
"skating",
"skeptical",
"skiing",
"skillful",
"skipping",
"skittish",
"skydiving",
"sleek",
"sleepwalking",
"sleepy",
"slender",
"slick",
"slimy",
"slinky",
"slippery",
"sloppy",
"sluggish",
"smart",
"smiling",
"smirking",
"smooth",
"smug",
"snacking",
"snappy",
"snarky",
"snarling",
"snazzy",
"sneaky",
"sneezing",
"sniffing",
"snobbish",
"snooty",
"snoring",
"snorkeling",
"snorting",
"snug",
"sober",
"sociable",
"soft",
"soggy",
"solemn",
"somber",
"soothing",
"sophisticated",
"sparkling",
"sparkly",
"speckled",
"spectacular",
"speechless",
"speedy",
"spellbound",
"spicy",
"spiky",
"spinning",
"spirited",
"splendid",
"spontaneous",
"sporty",
"spotless",
"spotted",
"spotty",
"sprawling",
"spry",
"spunky",
"squabbling",
"squeaky",
"squealing",
"squinting",
"squishy",
"startled",
"stately",
"staunch",
"steadfast",
"stealthy",
"sticky",
"stinky",
"stocky",
"stoic",
"stomping",
"stormy",
"stout",
"strange",
"strapping",
"striking",
"striped",
"strolling",
"strutting",
"stubborn",
"studious",
"stunning",
"sturdy",
"stylish",
"suave",
"subtle",
"successful",
"sunbathing",
"sunny",
"superb",
"supersonic",
"supreme",
"surfing",
"surly",
"surprised",
"suspicious",
"swanky",
"swaying",
"sweaty",
"sweet",
"swift",
"swimming",
"sympathetic",
"tactful",
"talented",
"talkative",
"tame",
"tangled",
"tardy",
"tasteful",
"tattered",
"tearful",
"tedious",
"teeny",
"teetering",
"temperamental",
"tenacious",
"tender",
"tense",
"terrific",
"testy",
"thankful",
"theatrical",
"thirsty",
"thoughtful",
"thrifty",
"thrilled",
"thundering",
"ticklish",
"tidy",
"timid",
"tinkering",
"tiny",
"tired",
"tireless",
"tolerant",
"touchy",
"tough",
"tranquil",
"trembling",
"tremendous",
"trendy",
"tricky",
"trim",
"triumphant",
"trotting",
"trusting",
"trustworthy",
"truthful",
"tubby",
"tumbling",
"turbocharged",
"turbulent",
"twinkling",
"twirling",
"twitchy",
"ultimate",
"unassuming",
"unbeatable",
"uncanny",
"undaunted",
"understanding",
"unflinching",
"unique",
"unkempt",
"unlucky",
"unpredictable",
"unstoppable",
"upbeat",
"useful",
"vacant",
"vain",
"valiant",
"velvety",
"venerable",
"versatile",
"vexed",
"vibrant",
"victorious",
"vigilant",
"vigorous",
"villainous",
"virtuous",
"visionary",
"vivacious",
"vocal",
"volatile",
"voracious",
"wacky",
"wailing",
"wandering",
"wary",
"wayward",
"wealthy",
"weary",
"weird",
"welcoming",
"wheezing",
"whimsical",
"whiny",
"whirling",
"whispering",
"whistling",
"wholesome",
"wicked",
"wiggling",
"wild",
"willful",
"wily",
"winged",
"winking",
"wintry",
"wiry",
"wise",
"wistful",
"withdrawn",
"witty",
"wobbling",
"wobbly",
"woeful",
"wonderful",
"wondering",
"wondrous",
"woolly",
"wordy",
"worldly",
"worried",
"worthy",
"yawning",
"yearning",
"young",
"youthful",
"zany",
"zealous",
"zen",
"zippy",
];
const ANIMALS: &[&str] = &[
"abalone",
"adder",
"adjutant",
"albatross",
"alligator",
"alpaca",
"anaconda",
"anchovy",
"anemone",
"ant",
"antelope",
"armadillo",
"baboon",
"badger",
"bandicoot",
"barnacle",
"barracuda",
"bass",
"bat",
"beagle",
"bear",
"beaver",
"bee",
"beetle",
"beluga",
"betta",
"bison",
"blackbird",
"bloodhound",
"bluebird",
"boa",
"boar",
"bobcat",
"bongo",
"bonito",
"bream",
"buffalo",
"bull",
"bulldog",
"bullock",
"bumblebee",
"bunny",
"bunting",
"butterfly",
"buzzard",
"calf",
"camel",
"canary",
"cardinal",
"caribou",
"carp",
"cat",
"caterpillar",
"catfish",
"centipede",
"chameleon",
"cheetah",
"chick",
"chicken",
"chihuahua",
"chimpanzee",
"chinchilla",
"chipmunk",
"chow",
"chub",
"clam",
"cobra",
"cockatoo",
"cockroach",
"cod",
"collie",
"colt",
"conch",
"condor",
"coot",
"coral",
"corgi",
"cougar",
"cow",
"coyote",
"crab",
"crane",
"crawfish",
"crayfish",
"cricket",
"crocodile",
"crow",
"cub",
"cuckoo",
"cuttlefish",
"dachshund",
"dalmatian",
"deer",
"dingo",
"dipper",
"doberman",
"dodo",
"dog",
"dolphin",
"donkey",
"dorado",
"dove",
"dragonfly",
"drake",
"duck",
"duckling",
"eagle",
"eel",
"elephant",
"elk",
"emu",
"ewe",
"falcon",
"fawn",
"ferret",
"filly",
"finch",
"firefly",
"fisher",
"flamingo",
"flea",
"flounder",
"fly",
"foal",
"fossa",
"fox",
"frog",
"gander",
"gar",
"gazelle",
"gecko",
"gibbon",
"giraffe",
"gnu",
"goat",
"goldfish",
"goose",
"gopher",
"gorilla",
"gosling",
"grasshopper",
"grayling",
"grenadier",
"greyhound",
"grouper",
"grouse",
"gull",
"haddock",
"halibut",
"hammerhead",
"hamster",
"hare",
"harrier",
"hawk",
"hedgehog",
"heifer",
"hen",
"heron",
"herring",
"hippo",
"hippopotamus",
"hog",
"honeybee",
"hornet",
"horse",
"hummingbird",
"humpback",
"husky",
"hyena",
"ibis",
"iguana",
"impala",
"jackal",
"jaguar",
"jay",
"jellyfish",
"joey",
"kaka",
"kangaroo",
"kea",
"kingfisher",
"kite",
"kitten",
"kiwi",
"koala",
"koi",
"krill",
"ladybird",
"ladybug",
"lamb",
"lark",
"leech",
"lemur",
"leopard",
"lion",
"lizard",
"llama",
"lobster",
"locust",
"loon",
"lynx",
"mackerel",
"magpie",
"mako",
"mallard",
"mamba",
"mammoth",
"manatee",
"manta",
"mantis",
"manx",
"mara",
"mare",
"marlin",
"marten",
"martin",
"mastiff",
"mastodon",
"merlin",
"mink",
"minnow",
"mite",
"mockingbird",
"mole",
"molly",
"mongoose",
"monkey",
"moose",
"mosquito",
"moth",
"mouse",
"mule",
"mullet",
"mussel",
"mustang",
"nautilus",
"newt",
"nighthawk",
"nightingale",
"octopus",
"orangutan",
"orca",
"oryx",
"osprey",
"ostrich",
"otter",
"owl",
"ox",
"oyster",
"panda",
"panther",
"papillon",
"parrot",
"partridge",
"peacock",
"pelican",
"penguin",
"perch",
"peregrine",
"pheasant",
"phoebe",
"pig",
"pigeon",
"piglet",
"pika",
"pike",
"piranha",
"platypus",
"plover",
"pollack",
"pollock",
"pomeranian",
"pony",
"poodle",
"porcupine",
"porpoise",
"possum",
"prawn",
"puffin",
"pug",
"puma",
"puppy",
"python",
"quail",
"rabbit",
"raccoon",
"rail",
"ram",
"rat",
"rattlesnake",
"raven",
"reindeer",
"retriever",
"rhea",
"rhino",
"rhinoceros",
"robin",
"rook",
"rooster",
"rottweiler",
"ruff",
"sable",
"salamander",
"salmon",
"sardine",
"scallop",
"scorpion",
"screamer",
"seagull",
"seahorse",
"seal",
"shad",
"shark",
"sheep",
"shrew",
"shrimp",
"skate",
"skunk",
"sloth",
"slug",
"smelt",
"snail",
"snake",
"snapper",
"snipe",
"sole",
"sow",
"spaniel",
"sparrow",
"spider",
"sponge",
"springbok",
"squid",
"squirrel",
"stallion",
"starfish",
"starling",
"steer",
"stingray",
"stork",
"sturgeon",
"swallow",
"swan",
"swift",
"swine",
"swordfish",
"tabby",
"tadpole",
"takin",
"tapeworm",
"tarantula",
"teal",
"termite",
"tern",
"terrier",
"tetra",
"thrasher",
"thrush",
"tiger",
"tilapia",
"toad",
"tomcat",
"tortoise",
"trout",
"trumpeter",
"tui",
"tuna",
"turkey",
"turtle",
"urchin",
"viper",
"vole",
"vulture",
"wahoo",
"wallaby",
"walleye",
"walrus",
"warbler",
"wasp",
"weasel",
"weevil",
"whale",
"wildebeest",
"wolf",
"wolverine",
"wombat",
"woodcock",
"woodpecker",
"worm",
"wren",
"yak",
"zander",
"zebra",
];
pub fn get_random(mut rng: impl rand_core::Rng) -> String {
let num = rng.next_u64() % 1000;
let adj = ADJECTIVES[(rng.next_u64() % ADJECTIVES.len() as u64) as usize];
let animal = ANIMALS[(rng.next_u64() % ANIMALS.len() as u64) as usize];
format!("{adj}-{animal}-{:03}", num)
}
#[cfg(test)]
mod tests {
use std::collections::HashSet;
use rand::rng;
use super::*;
#[test]
fn test_ends_with_three_digit_num() {
let mut rng = rng();
let name = get_random(&mut rng);
assert_eq!(name.split('-').count(), 3);
assert_eq!(name.split('-').next_back().unwrap().len(), 3);
}
#[test]
fn test_at_least_400_million_combinations() {
let combinations = ADJECTIVES.len() * ANIMALS.len() * 1000;
assert!(
combinations >= 400_000_000,
"only {combinations} combinations"
);
}
#[test]
fn test_words_are_unique_lowercase_letters() {
for list in [ADJECTIVES, ANIMALS] {
assert_eq!(list.iter().collect::<HashSet<_>>().len(), list.len());
assert!(
list.iter()
.all(|w| !w.is_empty() && w.bytes().all(|b| b.is_ascii_lowercase()))
);
}
}
}