From 86e1b39ef1583d4d9860958501d277c5705bc2ff Mon Sep 17 00:00:00 2001 From: Martin von Zweigbergk Date: Fri, 3 Feb 2023 09:44:40 -0800 Subject: [PATCH] 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. --- src/commands/branch.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/commands/branch.rs b/src/commands/branch.rs index 5d9b13ef1..af456085e 100644 --- a/src/commands/branch.rs +++ b/src/commands/branch.rs @@ -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}")));