diff options
Diffstat (limited to 'src/protocol/ppp.rs')
| -rw-r--r-- | src/protocol/ppp.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/protocol/ppp.rs b/src/protocol/ppp.rs index 97fa0e5..1c08ce7 100644 --- a/src/protocol/ppp.rs +++ b/src/protocol/ppp.rs @@ -51,9 +51,9 @@ impl From<u16> for PPPProtocol { impl Decode for PPPProtocol { type Iterm = PPPProtocol; fn decode(input: &[u8]) -> IResult<&[u8], PPPProtocol> { - let (input, protocol) = number::streaming::be_u16(input)?; + let (input, protocol) = number::streaming::be_u16(input).map(|(i, l)| (i, l.into()))?; - Ok((input, protocol.into())) + Ok((input, protocol)) } } |
