ok/jj
1
0
Fork 0
forked from mirrors/jj

templater: remove redundant boxing of single template term

It was a copy-paste error.
This commit is contained in:
Yuya Nishihara 2023-01-29 13:08:10 +09:00
parent 2971c45e04
commit 62def97f58

View file

@ -360,7 +360,7 @@ fn parse_commit_template_rule<'a>(
.collect_vec();
match templates.len() {
0 => Box::new(Literal(String::new())),
1 => Box::new(templates.pop().unwrap()),
1 => templates.pop().unwrap(),
_ => Box::new(ListTemplate(templates)),
}
}