diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2024-03-21 12:07:45 +0100 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2024-03-21 12:08:07 +0100 |
commit | 9e64f3c4b6a5adf7ee7c5c36447f05b1e8fa4515 (patch) | |
tree | 027bf931af01f72052ee3375b15e0e9581b4f981 | |
parent | a815a98d431208244ae1a3455e18166ccc9f20ad (diff) |
Fix: Take whole slice for properties
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
-rw-r--r-- | mqtt-format/src/v5/variable_header.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/mqtt-format/src/v5/variable_header.rs b/mqtt-format/src/v5/variable_header.rs index d24a1c0..032e844 100644 --- a/mqtt-format/src/v5/variable_header.rs +++ b/mqtt-format/src/v5/variable_header.rs @@ -146,10 +146,12 @@ impl<'i> MqttProperties<'i> for UserProperties<'i> { 'input: 'i, { winnow::combinator::trace("UserProperties", |input: &mut &'input Bytes| { + let slice = *input; + // We only need to verify there is a correct string pair - let prop = UserProperty::parse.recognize().parse_next(input)?; + let _prop = UserProperty::parse.recognize().parse_next(input)?; - Ok(Self(prop)) + Ok(Self(slice)) }) .parse_next(input) } |