summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2024-03-21 12:07:45 +0100
committerMatthias Beyer <mail@beyermatthias.de>2024-03-21 12:08:07 +0100
commit9e64f3c4b6a5adf7ee7c5c36447f05b1e8fa4515 (patch)
tree027bf931af01f72052ee3375b15e0e9581b4f981
parenta815a98d431208244ae1a3455e18166ccc9f20ad (diff)
Fix: Take whole slice for properties
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
-rw-r--r--mqtt-format/src/v5/variable_header.rs6
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)
}