Skip to content

DesignCraft: An open-source page and layout design editor written by scratch in pure Rust

EPUB/HTML: bool::then_some for the list tag (clippy)

Gert Pellin553a04311a0a
diff --git a/crates/epub/src/lib.rs b/crates/epub/src/lib.rs
index f500bcd47..06745d16c 100644
--- a/crates/epub/src/lib.rs
+++ b/crates/epub/src/lib.rs
@@ -446,7 +446,7 @@ pub fn story_html(doc: &Document, sid: StoryId) -> String {
if !continues_pre && pre.take().is_some() {
out.push_str("</pre>\n");
}
- let list_tag = (tag == "li").then(|| match props.list_type {
+ let list_tag = (tag == "li").then_some(match props.list_type {
designcraft_doc::ListType::Numbers => "ol",
designcraft_doc::ListType::Bullets => "ul",
designcraft_doc::ListType::None => "ul style=\"list-style:none\"",