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

templater: remove unused repo from CommitOrChangeIdShort

This commit is contained in:
Yuya Nishihara 2023-01-23 16:43:56 +09:00
parent f47552b744
commit e15b35ba56
2 changed files with 3 additions and 5 deletions

View file

@ -215,7 +215,7 @@ fn parse_commit_or_change_id_method<'a>(
// TODO: validate arguments
let this_function = match name.as_str() {
"short" => Property::String(Box::new(CommitOrChangeIdShort { repo })),
"short" => Property::String(Box::new(CommitOrChangeIdShort)),
"short_prefix_and_brackets" => {
Property::String(Box::new(CommitOrChangeIdShortPrefixAndBrackets { repo }))
}

View file

@ -497,11 +497,9 @@ fn highlight_shortest_prefix(id: &CommitOrChangeId, total_len: usize, repo: Repo
}
}
pub struct CommitOrChangeIdShort<'a> {
pub repo: RepoRef<'a>,
}
pub struct CommitOrChangeIdShort;
impl TemplateProperty<CommitOrChangeId> for CommitOrChangeIdShort<'_> {
impl TemplateProperty<CommitOrChangeId> for CommitOrChangeIdShort {
type Output = String;
fn extract(&self, context: &CommitOrChangeId) -> Self::Output {