radicle/storage: Remove unused Remote methods
Remove the methods and constructors, that are unused, from `struct Remote`.
This commit is contained in:
parent
e78d477bcf
commit
ba8d6b8864
|
|
@ -336,16 +336,6 @@ impl<V> Remotes<V> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Remotes<Verified> {
|
|
||||||
pub fn unverified(self) -> Remotes<Unverified> {
|
|
||||||
Remotes(
|
|
||||||
self.into_iter()
|
|
||||||
.map(|(id, r)| (id, r.unverified()))
|
|
||||||
.collect(),
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl<V> Default for Remotes<V> {
|
impl<V> Default for Remotes<V> {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
Self(RandomMap::default())
|
Self(RandomMap::default())
|
||||||
|
|
@ -387,26 +377,12 @@ impl Remote<Unverified> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Remote<Unverified> {
|
|
||||||
pub fn verified<R: ReadRepository>(self, repo: &R) -> Result<Remote<Verified>, Error> {
|
|
||||||
let refs = self.refs.verified(repo)?;
|
|
||||||
|
|
||||||
Ok(Remote { refs })
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl Remote<Verified> {
|
impl Remote<Verified> {
|
||||||
/// Create a new unverified remotes object.
|
/// Create a new unverified remotes object.
|
||||||
pub fn new(refs: impl Into<SignedRefs<Verified>>) -> Self {
|
pub fn new(refs: impl Into<SignedRefs<Verified>>) -> Self {
|
||||||
Self { refs: refs.into() }
|
Self { refs: refs.into() }
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn unverified(self) -> Remote<Unverified> {
|
|
||||||
Remote {
|
|
||||||
refs: self.refs.unverified(),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn to_refspecs(&self) -> Vec<Refspec<PatternString, PatternString>> {
|
pub fn to_refspecs(&self) -> Vec<Refspec<PatternString, PatternString>> {
|
||||||
let ns = self.id.to_namespace();
|
let ns = self.id.to_namespace();
|
||||||
// Nb. the references in Refs are expected to be Qualified
|
// Nb. the references in Refs are expected to be Qualified
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue