diff --git a/src/parser.rs b/src/parser.rs index 4c63036..e94d79f 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -100,7 +100,7 @@ impl Parser { &'a self, input: &'a [u8], ty: MessageType, - ) -> IResult<&'a [u8], Vec<(Key, Value)>> { + ) -> IResult<&'a [u8], Vec<(Key, Value<'a>)>> { // Handle some corner cases that don't fit the general key=value // scheme. let (input, special) = match ty { @@ -167,7 +167,11 @@ impl Parser { /// Recognize one key/value pair #[inline(always)] - fn parse_kv<'a>(&'a self, input: &'a [u8], ty: MessageType) -> IResult<&'a [u8], (Key, Value)> { + fn parse_kv<'a>( + &'a self, + input: &'a [u8], + ty: MessageType, + ) -> IResult<&'a [u8], (Key, Value<'a>)> { let (input, key) = match ty { // Special case for execve arguments: aX, aX[Y], aX_len MessageType::EXECVE @@ -217,7 +221,7 @@ impl Parser { input: &'a [u8], ty: MessageType, c: Common, - ) -> IResult<&'a [u8], Value> { + ) -> IResult<&'a [u8], Value<'a>> { let name = <&str>::from(c).as_bytes(); match c { Common::Arch | Common::CapFi | Common::CapFp | Common::CapFver => { diff --git a/src/value.rs b/src/value.rs index 023f223..fbb514d 100644 --- a/src/value.rs +++ b/src/value.rs @@ -354,7 +354,7 @@ impl From for Value<'_> { pub(crate) struct Bytes<'a>(pub &'a [u8]); #[cfg(feature = "serde")] -impl<'a> Serialize for Bytes<'a> { +impl Serialize for Bytes<'_> { fn serialize(&self, s: S) -> Result { s.serialize_bytes(self.0) }