fix(src/refs.rs): update lifetime annotations

Suggested by new clippy.

Signed-off-by: Lars Wirzenius <liw@liw.fi>
This commit is contained in:
Lars Wirzenius
2025-08-08 09:39:47 +03:00
parent f6cab9bb57
commit 66a374dd4b
+2 -2
View File
@@ -61,7 +61,7 @@ pub fn branch_from_str(s: &str) -> Result<BranchName, RefError> {
}
/// Convert a branch name to a [`Qualified`]: `refs/heads/main`.
pub fn qualified_branch(name: &BranchName) -> Result<Qualified, RefError> {
pub fn qualified_branch(name: &BranchName) -> Result<Qualified<'_>, RefError> {
if name.starts_with("refs/") {
return Err(RefError::RefsInName(name.to_ref_string()));
}
@@ -85,7 +85,7 @@ pub fn namespaced_branch<'a>(
}
/// Create a name spaced ref name from a string slice.
pub fn namespaced_from_str(s: &str) -> Result<Namespaced, RefError> {
pub fn namespaced_from_str(s: &str) -> Result<Namespaced<'_>, RefError> {
assert!(s.starts_with("refs/namespaces/"));
let rs = ref_string(s)?;
Ok(rs