diff options
Diffstat (limited to 'src/utils')
| -rw-r--r-- | src/utils/mod.rs | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/src/utils/mod.rs b/src/utils/mod.rs index dad5112..fc95a86 100644 --- a/src/utils/mod.rs +++ b/src/utils/mod.rs @@ -92,15 +92,7 @@ pub fn vecmap_to_json_map<K: PartialEq + ToString>(map: VecMap<K, Value>) -> Map /// assert!(!utils::is_nsfw("nsfwstuff")); /// ``` pub fn is_nsfw(name: &str) -> bool { - let char_count = name.chars().count(); - - if char_count == 4 { - name == "nsfw" - } else if char_count > 5 { - name.starts_with("nsfw-") - } else { - false - } + name == "nsfw" || name.starts_with("nsfw-") } /// Retrieves the "code" part of an invite out of a URL. |