From 43d4df272a137f3a3b04d069248f8dd19a2ed4fe Mon Sep 17 00:00:00 2001 From: 0xf8 <0xf8.dev@proton.me> Date: Wed, 12 Apr 2023 01:01:52 -0400 Subject: [PATCH] Change the length test to use chars().count() instead of len() --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 8dbea00..1e268c2 100644 --- a/src/main.rs +++ b/src/main.rs @@ -37,7 +37,7 @@ async fn on_room_message(event: OriginalSyncRoomMessageEvent, room: Room) { } // Too short to be a scam lol - if text_content.body.len() < 12 { return } + if text_content.body.chars().count() < 12 { return } let text_content = text_content.body.to_lowercase();