aboutsummaryrefslogtreecommitdiff
path: root/src/primitive/unsignedint.rs
diff options
context:
space:
mode:
authorMax Audron <me@audron.dev>2026-02-21 14:35:01 +0100
committerMax Audron <me@audron.dev>2026-02-21 14:35:01 +0100
commitf42ef4bec6d1c63c0d8564cfb06e996666dedbe3 (patch)
treee526bf4cae5ecf798469acc157b14122d4a5e25a /src/primitive/unsignedint.rs
parentreplace all match_variant instances with try_into (diff)
clean up clippy lints
Diffstat (limited to 'src/primitive/unsignedint.rs')
-rw-r--r--src/primitive/unsignedint.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/primitive/unsignedint.rs b/src/primitive/unsignedint.rs
index a51ca6f..8176a9d 100644
--- a/src/primitive/unsignedint.rs
+++ b/src/primitive/unsignedint.rs
@@ -44,7 +44,7 @@ impl Serialize for u64 {
impl Deserialize for u64 {
fn parse(b: &[u8]) -> Result<(usize, Self), ProtocolError> {
let mut rdr = Cursor::new(&b[0..8]);
- return Ok((8, rdr.read_u64::<BigEndian>()?));
+ Ok((8, rdr.read_u64::<BigEndian>()?))
}
}
@@ -61,7 +61,7 @@ impl Serialize for u32 {
impl Deserialize for u32 {
fn parse(b: &[u8]) -> Result<(usize, Self), ProtocolError> {
let mut rdr = Cursor::new(&b[0..4]);
- return Ok((4, rdr.read_u32::<BigEndian>()?));
+ Ok((4, rdr.read_u32::<BigEndian>()?))
}
}
@@ -78,7 +78,7 @@ impl Serialize for u16 {
impl Deserialize for u16 {
fn parse(b: &[u8]) -> Result<(usize, Self), ProtocolError> {
let mut rdr = Cursor::new(&b[0..2]);
- return Ok((2, rdr.read_u16::<BigEndian>()?));
+ Ok((2, rdr.read_u16::<BigEndian>()?))
}
}
@@ -94,7 +94,7 @@ impl Serialize for u8 {
impl Deserialize for u8 {
fn parse(b: &[u8]) -> Result<(usize, Self), ProtocolError> {
- return Ok((1, b[0]));
+ Ok((1, b[0]))
}
}