diff options
Diffstat (limited to 'src/utils.rs')
| -rw-r--r-- | src/utils.rs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/utils.rs b/src/utils.rs index bb57521..78e02dd 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -13,9 +13,7 @@ const FILES: Dir = include_dir!("src/include"); */ async fn random_choice<const N: usize>(arr: [&str; N]) -> String { let mut rng = rand::thread_rng(); - let resp = arr - .choose(&mut rng) - .expect("couldn't choose random value!"); + let resp = arr.choose(&mut rng).expect("couldn't choose random value!"); resp.to_string() } @@ -25,11 +23,11 @@ async fn random_choice<const N: usize>(arr: [&str; N]) -> String { */ pub async fn get_random_response() -> String { - random_choice(RESPONSES).await + random_choice(RESPONSES).await } pub async fn get_random_lore() -> String { - random_choice(LORE).await + random_choice(LORE).await } /* |
