git-ref-format: remove link-literals feature

Since this package is not intended for radicle-link anymore, the
feature flag and the literals are removed.

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
This commit is contained in:
Fintan Halpenny
2022-11-18 15:45:08 +00:00
parent 93c13505bb
commit d45d63b7ce
6 changed files with 5 additions and 242 deletions
-54
View File
@@ -267,60 +267,6 @@ impl Display for Qualified<'_> {
}
}
#[cfg(feature = "link-literals")]
mod link {
use super::*;
impl From<lit::RefsRadId> for Qualified<'_> {
#[inline]
fn from((refs, rad, id): lit::RefsRadId) -> Self {
Self(Cow::Owned(
IntoIterator::into_iter([Component::from(refs), rad.into(), id.into()]).collect(),
))
}
}
impl From<lit::RefsRadSelf> for Qualified<'_> {
#[inline]
fn from((refs, rad, selv): lit::RefsRadSelf) -> Self {
Self(Cow::Owned(
IntoIterator::into_iter([Component::from(refs), rad.into(), selv.into()]).collect(),
))
}
}
impl From<lit::RefsRadSignedRefs> for Qualified<'_> {
#[inline]
fn from((refs, rad, sig): lit::RefsRadSignedRefs) -> Self {
Self(Cow::Owned(
IntoIterator::into_iter([Component::from(refs), rad.into(), sig.into()]).collect(),
))
}
}
impl<'a, T: Into<Component<'a>>> From<lit::RefsRadIds<T>> for Qualified<'_> {
#[inline]
fn from((refs, rad, ids, id): lit::RefsRadIds<T>) -> Self {
Self(Cow::Owned(
IntoIterator::into_iter([Component::from(refs), rad.into(), ids.into(), id.into()])
.collect(),
))
}
}
impl<'a, T: Into<Component<'a>>, I: Into<Component<'a>>> From<lit::RefsCobs<T, I>>
for Qualified<'_>
{
#[inline]
fn from((refs, cobs, ty, id): lit::RefsCobs<T, I>) -> Self {
Self(Cow::Owned(
IntoIterator::into_iter([Component::from(refs), cobs.into(), ty.into(), id.into()])
.collect(),
))
}
}
}
/// A [`Qualified`] ref under a git namespace.
///
/// A ref is namespaced if it starts with "refs/namespaces/", another path