chore: Fix several style lints (#17488)

It's not comprehensive enough to start linting on `style` group, but
hey, it's a start.

Release Notes:

- N/A
This commit is contained in:
Piotr Osiewicz 2024-09-06 11:58:39 +02:00 committed by GitHub
parent 93249fc82b
commit e6c1c51b37
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
361 changed files with 3530 additions and 3587 deletions

View file

@ -191,7 +191,7 @@ pub async fn parse_markdown_block(
style.strikethrough = true;
}
if let Some(link) = link_url.clone().and_then(|u| Link::identify(u)) {
if let Some(link) = link_url.clone().and_then(Link::identify) {
region_ranges.push(prev_len..text.len());
regions.push(ParsedRegion {
code: false,
@ -222,7 +222,7 @@ pub async fn parse_markdown_block(
text.push_str(t.as_ref());
region_ranges.push(prev_len..text.len());
let link = link_url.clone().and_then(|u| Link::identify(u));
let link = link_url.clone().and_then(Link::identify);
if link.is_some() {
highlights.push((
prev_len..text.len(),
@ -336,7 +336,7 @@ pub fn highlight_code(
}
/// Appends a new paragraph to the provided `text` buffer.
pub fn new_paragraph(text: &mut String, list_stack: &mut Vec<(Option<u64>, bool)>) {
pub fn new_paragraph(text: &mut String, list_stack: &mut [(Option<u64>, bool)]) {
let mut is_subsequent_paragraph_of_list = false;
if let Some((_, has_content)) = list_stack.last_mut() {
if *has_content {