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

cli: remove unnecessary lifetime in validate_branch_names_exist()

The lifetime isn't in the output and doesn't seem to constrain the
inputs either, so I think it had no effect.
This commit is contained in:
Martin von Zweigbergk 2023-02-03 09:44:40 -08:00 committed by Martin von Zweigbergk
parent 4bff2ca172
commit 86e1b39ef1

View file

@ -331,10 +331,7 @@ fn cmd_branch_list(
Ok(())
}
fn validate_branch_names_exist<'a>(
view: &'a View,
names: &'a [String],
) -> Result<(), CommandError> {
fn validate_branch_names_exist(view: &View, names: &[String]) -> Result<(), CommandError> {
for branch_name in names {
if view.get_local_branch(branch_name).is_none() {
return Err(user_error(format!("No such branch: {branch_name}")));