From a8bcee4c2933a88cf660591d4ee0598c2a8c0709 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ben=20P=C3=BCschel?= Date: Sun, 22 Sep 2024 02:25:13 +0200 Subject: [PATCH] fix(refs)!: remove `Reference::Commit` variant (#697) --- src/params.rs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/params.rs b/src/params.rs index b4538775..450e073f 100644 --- a/src/params.rs +++ b/src/params.rs @@ -481,7 +481,6 @@ pub mod repos { pub enum Reference { Branch(String), Tag(String), - Commit(String), } impl Reference { @@ -489,15 +488,11 @@ pub mod repos { match self { Self::Branch(branch) => format!("heads/{branch}"), Self::Tag(tag) => format!("tags/{tag}"), - Self::Commit(sha) => sha.clone(), } } pub fn full_ref_url(&self) -> String { - match self { - Self::Branch(_) | Self::Tag(_) => format!("refs/{}", self.ref_url()), - Self::Commit(sha) => sha.clone(), - } + format!("refs/{}", self.ref_url()) } }