refactor: run clippy

This commit is contained in:
Ushie 2023-04-18 19:43:18 +03:00 committed by oSumAtrIX
parent 4fbe66762f
commit 8177304717
No known key found for this signature in database
GPG Key ID: A9B3094ACDB604B4

View File

@ -17,11 +17,11 @@ pub async fn cure(
let mut censor = Standard; let mut censor = Standard;
for addition in additions { for addition in additions {
censor = censor + addition; censor += addition;
} }
for removal in removals { for removal in removals {
censor = censor - removal; censor -= removal;
} }
if member.user.bot { if member.user.bot {
@ -46,10 +46,7 @@ pub async fn cure(
"", "",
); );
if cured_name.is_empty() if cured_name.is_empty() || !cured_name.starts_with(|c: char| c.is_ascii_alphabetic()) || censor.check(&cured_name) {
|| !cured_name.starts_with(|c: char| c.is_ascii_alphabetic())
|| censor.check(&cured_name)
{
cured_name = "ReVanced member".to_string(); cured_name = "ReVanced member".to_string();
} }