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