diff options
| author | Max Audron <audron@cocaine.farm> | 2025-05-06 16:17:35 +0200 |
|---|---|---|
| committer | Max Audron <audron@cocaine.farm> | 2025-05-06 16:19:30 +0200 |
| commit | b6350162b4c70abb896613e4ebea65ca1661450d (patch) | |
| tree | 2e55e0477b4d2f7a646a97f92ee1362db769f75e /src/hooks/pet.rs | |
| parent | add nix build and module (diff) | |
update dependencies
Diffstat (limited to 'src/hooks/pet.rs')
| -rw-r--r-- | src/hooks/pet.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/hooks/pet.rs b/src/hooks/pet.rs index d11f562..990329d 100644 --- a/src/hooks/pet.rs +++ b/src/hooks/pet.rs @@ -2,8 +2,7 @@ use anyhow::{Context, Result}; use irc::client::prelude::*; use macros::privmsg; -use rand::seq::SliceRandom; -use rand::thread_rng; +use rand::{prelude::IndexedRandom, rng}; const PET_RESPONSE: [&str; 5] = [ "purrs", @@ -22,7 +21,7 @@ pub fn pet(bot: &crate::Bot, msg: Message) -> Result<()> { msg.response_target() .context("failed to get response target")?, PET_RESPONSE - .choose(&mut thread_rng()) + .choose(&mut rng()) .context("failed choosing a pet response")?, )?; }) |
