Don't expose private sig parse method via try_from
This commit is contained in:
parent
7548018491
commit
eb22e800a1
2 changed files with 1 additions and 8 deletions
|
@ -49,7 +49,7 @@ impl<'a> NarInfo<'a> {
|
||||||
"System" => builder.system(Some(Cow::from(value))),
|
"System" => builder.system(Some(Cow::from(value))),
|
||||||
"References" => builder.references(value.split(' ').map(Cow::from).collect()),
|
"References" => builder.references(value.split(' ').map(Cow::from).collect()),
|
||||||
"Sig" => {
|
"Sig" => {
|
||||||
sigs.push(Sig::try_from(value)?);
|
sigs.push(Sig::parse(value)?);
|
||||||
&mut builder
|
&mut builder
|
||||||
},
|
},
|
||||||
_ => return Err(ParsingError::UnknownKey { key }),
|
_ => return Err(ParsingError::UnknownKey { key }),
|
||||||
|
|
|
@ -12,13 +12,6 @@ pub struct Sig<'a> {
|
||||||
pub sig: Cow<'a, str>,
|
pub sig: Cow<'a, str>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> TryFrom<&'a str> for Sig<'a> {
|
|
||||||
type Error = ParsingError<'a>;
|
|
||||||
|
|
||||||
fn try_from(value: &'a str) -> ParsingResult<Self> {
|
|
||||||
Sig::parse(value)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// Neither the parse nor the serializa method is public since
|
// Neither the parse nor the serializa method is public since
|
||||||
// it doesn't really make sense to de/serialize the
|
// it doesn't really make sense to de/serialize the
|
||||||
// sig into the narinfo format outside of de/serializing a whole narinfo
|
// sig into the narinfo format outside of de/serializing a whole narinfo
|
||||||
|
|
Loading…
Reference in a new issue