From d1281ef48e4c0aca03dfe7c4cb987283e35a6d7a Mon Sep 17 00:00:00 2001 From: Yuya Nishihara Date: Sat, 28 Jan 2023 20:37:49 +0900 Subject: [PATCH] templater: ensure "template" node is passed to parse_commit_template_rule() Assertion will be added by the next commit. --- src/template_parser.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/template_parser.rs b/src/template_parser.rs index 1c47b6b03..8975ce780 100644 --- a/src/template_parser.rs +++ b/src/template_parser.rs @@ -298,11 +298,8 @@ fn parse_commit_term<'a>( match name { "label" => { let label_pair = inner.next().unwrap(); - let label_template = parse_commit_template_rule( - repo, - workspace_id, - label_pair.into_inner().next().unwrap(), - ); + let label_template = + parse_commit_template_rule(repo, workspace_id, label_pair); let arg_template = match inner.next() { None => panic!("label() requires two arguments"), Some(pair) => pair,