summaryrefslogtreecommitdiff
path: root/src/utils.rs
diff options
context:
space:
mode:
authorseth <[email protected]>2023-04-07 20:02:01 -0400
committerseth <[email protected]>2023-04-07 20:02:01 -0400
commit065ac97194b7640ca350b4770b404d855bf98b17 (patch)
treed7ef12c7fd1b552fdd39987979439f1bddeab0e8 /src/utils.rs
parentbb3df7e6ab9de4c52fbe81b589ac5d1add6d281d (diff)
cargo fmt
Diffstat (limited to 'src/utils.rs')
-rw-r--r--src/utils.rs8
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
}
/*