Skip to content

Commit

Permalink
fix(clippy): minor clippy changes
Browse files Browse the repository at this point in the history
  • Loading branch information
sigaloid committed Feb 3, 2025
1 parent ef2cc01 commit c7f55c1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1004,7 +1004,7 @@ static REGEX_BULLET_CONSECUTIVE_LINES: Lazy<Regex> = Lazy::new(|| Regex::new(r"<
pub fn render_bullet_lists(input_text: &str) -> String {
// ref: https://stackoverflow.com/a/4902622
// First enclose each bullet with <ul> <li> tags
let text1 = REGEX_BULLET.replace_all(&input_text, "<ul><li>$1</li></ul>").to_string();
let text1 = REGEX_BULLET.replace_all(input_text, "<ul><li>$1</li></ul>").to_string();
// Then remove any consecutive </ul> <ul> tags
REGEX_BULLET_CONSECUTIVE_LINES.replace_all(&text1, "").to_string()
}
Expand Down Expand Up @@ -1344,7 +1344,7 @@ pub fn url_path_basename(path: &str) -> String {
let mut url = url_result.unwrap();
url.path_segments_mut().unwrap().pop_if_empty();

url.path_segments().unwrap().last().unwrap().to_string()
url.path_segments().unwrap().next_back().unwrap().to_string()
}
}

Expand Down

0 comments on commit c7f55c1

Please sign in to comment.