From 0fb814c6d6d7c1173c0b23e84f9d4142f1b2ef38 Mon Sep 17 00:00:00 2001 From: Gabor Szabo Date: Tue, 4 Mar 2025 17:34:08 +0200 Subject: [PATCH] eliminate needless_late_init https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init --- src/renderer/html_handlebars/helpers/toc.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/renderer/html_handlebars/helpers/toc.rs b/src/renderer/html_handlebars/helpers/toc.rs index d43c617fcd..a3419ce817 100644 --- a/src/renderer/html_handlebars/helpers/toc.rs +++ b/src/renderer/html_handlebars/helpers/toc.rs @@ -107,8 +107,7 @@ impl HelperDef for RenderToc { } // Link - let path_exists: bool; - match item.get("path") { + let path_exists = match item.get("path") { Some(path) if !path.is_empty() => { out.write("" })?; - path_exists = true; + true } _ => { out.write("
")?; - path_exists = false; + false } - } + }; if !self.no_section_label { // Section does not necessarily exist