diff --git a/src/utils/string_utils.rs b/src/utils/string_utils.rs index 5006f20..5549dc9 100644 --- a/src/utils/string_utils.rs +++ b/src/utils/string_utils.rs @@ -19,8 +19,8 @@ use regex::Regex; /// assert_eq!(res1, "<b>hello world</b>"); /// ``` pub fn remove_html_nodes(input: &str) -> String { - input.replace("<", "<") - .replace(">", ">") + input.replace('<', "<") + .replace('>', ">") } /// Check out whether a URL is valid or not @@ -64,14 +64,14 @@ pub fn check_string_before_insert(s: &str) -> bool { /// ``` pub fn check_youtube_id(id: &str) -> bool { id.len() >= 5 - && !id.contains("/") - && !id.contains("\\") - && !id.contains("@") - && !id.contains("&") - && !id.contains("?") - && !id.contains(".") - && !id.contains("'") - && !id.contains("\"") + && !id.contains('/') + && !id.contains('\\') + && !id.contains('@') + && !id.contains('&') + && !id.contains('?') + && !id.contains('.') + && !id.contains('\'') + && !id.contains('\"') }