Fix clippy lints for Rust 1.87

This commit is contained in:
Héctor Ramón Jiménez 2025-05-15 20:52:27 +02:00
parent 204c4773d5
commit 9a7ea88d55
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
5 changed files with 11 additions and 20 deletions

View file

@ -298,13 +298,11 @@ impl Span {
span
};
let span = if let Some(link) = link.as_ref() {
if let Some(link) = link.as_ref() {
span.color(style.link_color).link(link.clone())
} else {
span
};
span
}
}
#[cfg(feature = "highlighter")]
Span::Highlight { text, color, font } => {
@ -632,7 +630,7 @@ fn parse_with<'a>(
code_language =
(!language.is_empty()).then(|| language.into_string());
let prev = if spans.is_empty() {
if spans.is_empty() {
None
} else {
produce(
@ -641,9 +639,7 @@ fn parse_with<'a>(
Item::Paragraph(Text::new(spans.drain(..).collect())),
source,
)
};
prev
}
}
pulldown_cmark::Tag::MetadataBlock(_) => {
metadata = true;