From 29be605c22e9b6ffc42b3313c2828830f440fec5 Mon Sep 17 00:00:00 2001 From: oSumAtrIX Date: Sun, 21 Aug 2022 22:51:12 +0200 Subject: [PATCH] refactor: lint --- src/commands/moderation.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commands/moderation.rs b/src/commands/moderation.rs index a70d5e1..2acd345 100644 --- a/src/commands/moderation.rs +++ b/src/commands/moderation.rs @@ -305,7 +305,7 @@ pub async fn ban( let ban_result = member .ban_with_reason( &ctx.discord().http, - cmp::min(dmd.or_else(|| Some(0)).unwrap(), 7), + cmp::min(dmd.unwrap_or(0), 7), reason, ) .await;