mirror of
https://github.com/martinvonz/jj.git
synced 2025-01-15 16:53:25 +00:00
templater: remove string.short() method
I think this is a remainder of 68ad712e12
"Templater: Combine Change and
Commit id templates." It doesn't make sense that description.short() prints
the first 12 characters.
This commit is contained in:
parent
b53f004372
commit
1a6e71170e
1 changed files with 0 additions and 9 deletions
|
@ -56,14 +56,6 @@ fn parse_string_literal(pair: Pair<Rule>) -> String {
|
|||
result
|
||||
}
|
||||
|
||||
struct StringShort;
|
||||
|
||||
impl TemplateProperty<String, String> for StringShort {
|
||||
fn extract(&self, context: &String) -> String {
|
||||
context.chars().take(12).collect()
|
||||
}
|
||||
}
|
||||
|
||||
struct StringFirstLine;
|
||||
|
||||
impl TemplateProperty<String, String> for StringFirstLine {
|
||||
|
@ -188,7 +180,6 @@ fn parse_string_method<'a>(method: Pair<Rule>) -> PropertyAndLabels<'a, String>
|
|||
// TODO: validate arguments
|
||||
|
||||
let this_function = match name.as_str() {
|
||||
"short" => Property::String(Box::new(StringShort)),
|
||||
"first_line" => Property::String(Box::new(StringFirstLine)),
|
||||
name => panic!("no such string method: {name}"),
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue