diff --git a/Cargo.lock b/Cargo.lock index 7d981de6..49ffa66d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,3 +1,5 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. [[package]] name = "aho-corasick" version = "0.6.8" diff --git a/src/utils/mod.rs b/src/utils/mod.rs index df997d5e..76dd16b9 100644 --- a/src/utils/mod.rs +++ b/src/utils/mod.rs @@ -61,7 +61,7 @@ pub fn id_from_content(content: &str) -> String { } // Remove spaces and hashes indicating a header - let trimmed = content.trim().trim_left_matches('#').trim(); + let trimmed = content.trim().trim_start_matches('#').trim(); normalize_id(trimmed) } diff --git a/tests/rendered_output.rs b/tests/rendered_output.rs index b7777ee7..062674a3 100644 --- a/tests/rendered_output.rs +++ b/tests/rendered_output.rs @@ -423,8 +423,8 @@ mod search { fn read_book_index(root: &Path) -> serde_json::Value { let index = root.join("book/searchindex.js"); let index = file_to_string(index).unwrap(); - let index = index.trim_left_matches("window.search = "); - let index = index.trim_right_matches(";"); + let index = index.trim_start_matches("window.search = "); + let index = index.trim_end_matches(";"); serde_json::from_str(&index).unwrap() }