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

cleanup: fix a few things reported by upgraded rustc and clippy

This commit is contained in:
Martin von Zweigbergk 2021-02-26 22:45:28 -08:00
parent d961f61623
commit 48b800e5c4
2 changed files with 4 additions and 5 deletions

View file

@ -1664,7 +1664,7 @@ fn cmd_evolve<'s>(
struct Listener<'a, 's> {
ui: &'a mut Ui<'s>,
};
}
impl<'a, 's> EvolveListener for Listener<'a, 's> {
fn orphan_evolved(&mut self, tx: &mut Transaction, orphan: &Commit, new_commit: &Commit) {

View file

@ -353,10 +353,9 @@ fn parse_commit_term<'a, 'r: 'a>(
None => panic!("if() requires at least two arguments"),
Some(pair) => parse_commit_template_rule(repo, pair),
};
let false_template = match inner.next() {
None => None,
Some(pair) => Some(parse_commit_template_rule(repo, pair)),
};
let false_template = inner
.next()
.map(|pair| parse_commit_template_rule(repo, pair));
if inner.next().is_some() {
panic!("if() accepts at most three arguments")
}