From 8177304717ac0c8e4769d60e865dc4fb8ddd387e Mon Sep 17 00:00:00 2001 From: Ushie Date: Tue, 18 Apr 2023 19:43:18 +0300 Subject: [PATCH] refactor: run clippy --- src/utils/decancer.rs | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/utils/decancer.rs b/src/utils/decancer.rs index 59ca863..d44e93b 100644 --- a/src/utils/decancer.rs +++ b/src/utils/decancer.rs @@ -13,15 +13,15 @@ pub async fn cure( let data_lock = get_data_lock(ctx).await; let additions = &data_lock.read().await.configuration.general.censor.additions; let removals = &data_lock.read().await.configuration.general.censor.removals; - + let mut censor = Standard; for addition in additions { - censor = censor + addition; + censor += addition; } for removal in removals { - censor = censor - removal; + censor -= removal; } if member.user.bot { @@ -46,10 +46,7 @@ pub async fn cure( "", ); - if cured_name.is_empty() - || !cured_name.starts_with(|c: char| c.is_ascii_alphabetic()) - || censor.check(&cured_name) - { + if cured_name.is_empty() || !cured_name.starts_with(|c: char| c.is_ascii_alphabetic()) || censor.check(&cured_name) { cured_name = "ReVanced member".to_string(); }