Compare commits

..

2 commits

Author SHA1 Message Date
bad
eb22e800a1 Don't expose private sig parse method via try_from 2022-08-19 23:23:10 +02:00
bad
7548018491 Bump version 2022-08-19 21:36:29 +02:00
3 changed files with 2 additions and 9 deletions

View file

@ -1,6 +1,6 @@
[package]
name = "narinfo"
version = "1.0.0"
version = "1.0.1"
edition = "2021"
description = "A parser for the narinfo file format"
repository = "https://im.badat.dev/bad/narinfo-rs"

View file

@ -49,7 +49,7 @@ impl<'a> NarInfo<'a> {
"System" => builder.system(Some(Cow::from(value))),
"References" => builder.references(value.split(' ').map(Cow::from).collect()),
"Sig" => {
sigs.push(Sig::try_from(value)?);
sigs.push(Sig::parse(value)?);
&mut builder
},
_ => return Err(ParsingError::UnknownKey { key }),

View file

@ -12,13 +12,6 @@ pub struct Sig<'a> {
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
// it doesn't really make sense to de/serialize the
// sig into the narinfo format outside of de/serializing a whole narinfo