From f153167e1df94096ce725d6e8871194894917d23 Mon Sep 17 00:00:00 2001 From: Titouan Rigoudy Date: Mon, 4 Jan 2021 13:41:58 +0000 Subject: [PATCH] Small fixes to value_codec.rs. --- src/proto/value_codec.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/proto/value_codec.rs b/src/proto/value_codec.rs index e93a69b..da5591b 100644 --- a/src/proto/value_codec.rs +++ b/src/proto/value_codec.rs @@ -191,6 +191,7 @@ impl<'a> ValueDecoder<'a> { Ok(decode_u32(array)) } + /// Attempts to decode a u16 value. fn decode_u16(&mut self) -> Result { let position = self.position; let n = self.decode_u32()?; @@ -422,7 +423,7 @@ impl ValueEncode for net::Ipv4Addr { // `core::convert::AsRef` for type `bool` in future versions". // We could probably work around this with more complex type logic (e.g. // wrapping primitive types in a newtype for which we implement -// Proto{De,En}code) but it is not really worth the hassle. +// Value{De,En}code) but it is not really worth the hassle. impl ValueEncode for str { fn encode(&self, encoder: &mut ValueEncoder) -> Result<(), ValueEncodeError> {