sqzass.git

sqzass

~ static site generator in Rust
git clone https://github.com/debuman/sqzass.git
commit 82cb8bb0d7bb156f11a835eb01ff1318b3d4346d
parent 086207ad4f9c3f1cfaeab3db3d46a64747d88d11
Author: sqzer <110329244+sqzer-x@users.noreply.github.com>
Date: Sat, 25 Jul 2026 17:57:14 +0900

Use struct update syntax in two tests

clippy::field_reassign_with_default failed CI on the previous commit. My local
check reported clean because the exit status was masked by a shell pipeline.

Diffstat:
Msrc/highlight.rs | 6++++--
Msrc/markdown.rs | 6++++--
2 files changed, 8 insertion(+), 4 deletion(-)

diff --git a/src/highlight.rs b/src/highlight.rs
@@ -234,8 +234,10 @@ mod tests {
 
     #[test]
     fn stylesheet_reports_unknown_theme_names() {
-        let mut cfg = HighlightConfig::default();
-        cfg.theme_dark = "NoSuchTheme".into();
+        let cfg = HighlightConfig {
+            theme_dark: "NoSuchTheme".into(),
+            ..HighlightConfig::default()
+        };
         let err = stylesheet(&cfg).unwrap_err().to_string();
         assert!(err.contains("NoSuchTheme"), "실제: {err}");
     }
diff --git a/src/markdown.rs b/src/markdown.rs
@@ -334,8 +334,10 @@ mod tests {
 
     #[test]
     fn anchors_can_be_disabled_but_ids_remain() {
-        let mut cfg = MarkdownConfig::default();
-        cfg.heading_anchors = HeadingAnchors::None;
+        let cfg = MarkdownConfig {
+            heading_anchors: HeadingAnchors::None,
+            ..MarkdownConfig::default()
+        };
         let r = Renderer::new(&cfg).render("## Title");
         assert!(r.html.contains(r#"<h2 id="title">"#), "실제: {}", r.html);
         assert!(