From a83aa2d9df0c88607978b99e65c15c6224967910 Mon Sep 17 00:00:00 2001 From: Andy Newjack Date: Mon, 27 Apr 2020 22:57:08 -0300 Subject: [PATCH] and i oop braces --- src/ship/ship.rs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/ship/ship.rs b/src/ship/ship.rs index 3cf03d2..750af72 100644 --- a/src/ship/ship.rs +++ b/src/ship/ship.rs @@ -71,12 +71,10 @@ impl RecvServerPacket for RecvShipPacket { fn from_bytes(data: &[u8]) -> Result { match u16::from_le_bytes([data[2], data[3]]) { 0x93 => Ok(RecvShipPacket::Login(Login::from_bytes(data)?)), - 0x10 => { - match data[0] { - 16 => Ok(RecvShipPacket::MenuSelect(MenuSelect::from_bytes(data)?)), - 48 => Ok(RecvShipPacket::RoomPasswordReq(RoomPasswordReq::from_bytes(data)?)), - _ => Err(PacketParseError::WrongPacketForServerType(u16::from_le_bytes([data[2], data[3]]), data.to_vec())), - } + 0x10 => match data[0] { + 16 => Ok(RecvShipPacket::MenuSelect(MenuSelect::from_bytes(data)?)), + 48 => Ok(RecvShipPacket::RoomPasswordReq(RoomPasswordReq::from_bytes(data)?)), + _ => Err(PacketParseError::WrongPacketForServerType(u16::from_le_bytes([data[2], data[3]]), data.to_vec())), }, 0x61 => Ok(RecvShipPacket::CharData(CharData::from_bytes(data)?)), 0x60 => Ok(RecvShipPacket::Message(Message::from_bytes(data)?)),