diff --git a/Cargo.lock b/Cargo.lock index 12b368f..c201470 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -330,7 +330,7 @@ dependencies = [ [[package]] name = "mangafetchi" -version = "0.1.3" +version = "0.1.4" dependencies = [ "quick-xml", "reqwest", diff --git a/Cargo.toml b/Cargo.toml index e905225..b4e0e38 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "mangafetchi" -version = "0.1.3" +version = "0.1.4" authors = ["blank X "] edition = "2018" diff --git a/src/utils.rs b/src/utils.rs index bdf0b77..74300bb 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -19,7 +19,7 @@ fn generate_slug(text: &str) -> String { .replace(&['ỳ', 'ý', 'ỵ', 'ỷ', 'ỹ'][..], "y") .replace('đ', "d") .replace(&['!', '@', '%', '^', '*', '(', ')', '+', '=', '<', '>', '?', '/', ',', '.', ':', ';', '\'', ' ', '"', '&', '#', '[', ']', '~', '-'][..], "_"); - while text.find("__").is_some() { + while text.contains("__") { text = text.replace("__", "_"); } text.trim_matches('_').to_string()