Skip to content

Commit 3e6b42c

Browse files
authored
Merge pull request #2568 from szabgab/remove-needless-late-init
[refactor] eliminate needless_late_init
2 parents c57a8fc + 0fb814c commit 3e6b42c

File tree

1 file changed

+4
-5
lines changed
  • src/renderer/html_handlebars/helpers

1 file changed

+4
-5
lines changed

src/renderer/html_handlebars/helpers/toc.rs

+4-5
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,7 @@ impl HelperDef for RenderToc {
107107
}
108108

109109
// Link
110-
let path_exists: bool;
111-
match item.get("path") {
110+
let path_exists = match item.get("path") {
112111
Some(path) if !path.is_empty() => {
113112
out.write("<a href=\"")?;
114113
let tmp = Path::new(path)
@@ -125,13 +124,13 @@ impl HelperDef for RenderToc {
125124
} else {
126125
"\">"
127126
})?;
128-
path_exists = true;
127+
true
129128
}
130129
_ => {
131130
out.write("<div>")?;
132-
path_exists = false;
131+
false
133132
}
134-
}
133+
};
135134

136135
if !self.no_section_label {
137136
// Section does not necessarily exist

0 commit comments

Comments
 (0)