diff options
| author | mat <github@matdoes.dev> | 2022-06-25 02:33:28 -0500 |
|---|---|---|
| committer | mat <github@matdoes.dev> | 2022-06-25 02:33:28 -0500 |
| commit | cd9a05e5a62190b3d4a2a733bf637d6324aec5fd (patch) | |
| tree | 15fb360678dfb5e8d81330144b810735b73f6ef4 /azalea-protocol/src/packets/game/clientbound_player_info_packet.rs | |
| parent | c9faf25fab4f89319731fec87ad4d2cf45864632 (diff) | |
| download | azalea-drasl-cd9a05e5a62190b3d4a2a733bf637d6324aec5fd.tar.xz | |
read_into -> read_from
yeah
Diffstat (limited to 'azalea-protocol/src/packets/game/clientbound_player_info_packet.rs')
| -rw-r--r-- | azalea-protocol/src/packets/game/clientbound_player_info_packet.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/azalea-protocol/src/packets/game/clientbound_player_info_packet.rs b/azalea-protocol/src/packets/game/clientbound_player_info_packet.rs index f216fde8..522a371a 100644 --- a/azalea-protocol/src/packets/game/clientbound_player_info_packet.rs +++ b/azalea-protocol/src/packets/game/clientbound_player_info_packet.rs @@ -63,14 +63,14 @@ pub struct RemovePlayer { } impl McBufReadable for Action { - fn read_into(buf: &mut impl Read) -> Result<Self, String> { + fn read_from(buf: &mut impl Read) -> Result<Self, String> { let id = buf.read_byte()?; Ok(match id { - 0 => Action::AddPlayer(Vec::<AddPlayer>::read_into(buf)?), - 1 => Action::UpdateGameMode(Vec::<UpdateGameMode>::read_into(buf)?), - 2 => Action::UpdateLatency(Vec::<UpdateLatency>::read_into(buf)?), - 3 => Action::UpdateDisplayName(Vec::<UpdateDisplayName>::read_into(buf)?), - 4 => Action::RemovePlayer(Vec::<RemovePlayer>::read_into(buf)?), + 0 => Action::AddPlayer(Vec::<AddPlayer>::read_from(buf)?), + 1 => Action::UpdateGameMode(Vec::<UpdateGameMode>::read_from(buf)?), + 2 => Action::UpdateLatency(Vec::<UpdateLatency>::read_from(buf)?), + 3 => Action::UpdateDisplayName(Vec::<UpdateDisplayName>::read_from(buf)?), + 4 => Action::RemovePlayer(Vec::<RemovePlayer>::read_from(buf)?), _ => panic!("Unknown player info action id: {}", id), }) } |
