From 7e3e94039367d633743e8fa1b821be202e23e639 Mon Sep 17 00:00:00 2001 From: shibedrill <53824200+shibedrill@users.noreply.github.com> Date: Tue, 23 Apr 2024 16:52:49 -0400 Subject: [PATCH] Add comments --- src/command/fun.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/command/fun.rs b/src/command/fun.rs index 866dddb..e5ded93 100644 --- a/src/command/fun.rs +++ b/src/command/fun.rs @@ -20,6 +20,8 @@ pub async fn meow(ctx: Context<'_>) -> Result<(), Error> { let mut rng = rand::thread_rng(); match rng.gen_bool(0.1) { true => "woof", + // Will never return None. The source is staticaly defined. + // We know it will always have items in it. false => meows.choose(&mut rng).unwrap(), } }; @@ -27,3 +29,4 @@ pub async fn meow(ctx: Context<'_>) -> Result<(), Error> { info!("Executed command `meow` successfully"); Ok(()) } +