Skip to content

Commit 77973c8

Browse files
changed uuid error handling
1 parent 8018432 commit 77973c8

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/packets/login_start.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,7 @@ impl LoginStartPacket {
1313
pub fn parse(buff: &mut BytesMut) -> anyhow::Result<Self> {
1414
Ok(Self {
1515
name: read_utf8(buff)?,
16-
uuid: match try_get_uuid(buff) {
17-
Ok(uuid) => Some(uuid),
18-
Err(_) => None,
19-
},
16+
uuid: try_get_uuid(buff).ok()
2017
})
2118
}
2219
}

0 commit comments

Comments
 (0)