Use implicit format string capture syntax

This commit is contained in:
cyqsimon 2023-10-29 17:49:57 +08:00 committed by Martin Nordholts
parent 2710a19ecb
commit f3a5e9a73c

View File

@ -77,7 +77,7 @@ fn render_template(
for (variable_name, value) in variables {
// Replace {{variable_name}} by the value
let pattern = format!("{{{{{variable_name}}}}}", variable_name = variable_name);
let pattern = format!("{{{{{variable_name}}}}}");
content = content.replace(&pattern, value);
}