aboutsummaryrefslogtreecommitdiff
path: root/src/protocol/commands/_m_upcase.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/protocol/commands/_m_upcase.rs')
-rw-r--r--src/protocol/commands/_m_upcase.rs9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/protocol/commands/_m_upcase.rs b/src/protocol/commands/_m_upcase.rs
index 49773aa..affe80d 100644
--- a/src/protocol/commands/_m_upcase.rs
+++ b/src/protocol/commands/_m_upcase.rs
@@ -8,18 +8,15 @@ pub struct M<'a> {
}
impl<'a> ParseCommand<'a> for M<'a> {
+ #[inline(always)]
fn from_packet(buf: PacketBuf<'a>) -> Option<Self> {
let body = buf.into_body();
let mut body = body.split_mut(|&b| b == b',' || b == b':');
let addr = decode_hex_buf(body.next()?).ok()?;
let len = decode_hex(body.next()?).ok()?;
- let val = body.next()?;
+ let val = decode_hex_buf(body.next()?).ok()?;
- Some(M {
- addr,
- len,
- val: decode_hex_buf(val).ok()?,
- })
+ Some(M { addr, len, val })
}
}