mirror of
https://seed.radicle.dev/rad:zwTxygwuz5LDGBq255RA2CbNGrz8.git
synced 2026-10-18 19:30:29 +08:00
fix(src/refs.rs): update lifetime annotations
Suggested by new clippy. Signed-off-by: Lars Wirzenius <liw@liw.fi>
This commit is contained in:
+2
-2
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user