aboutsummaryrefslogtreecommitdiff
path: root/azalea/examples/testbot.rs
diff options
context:
space:
mode:
Diffstat (limited to 'azalea/examples/testbot.rs')
-rw-r--r--azalea/examples/testbot.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/azalea/examples/testbot.rs b/azalea/examples/testbot.rs
index 3d566410..14800e9c 100644
--- a/azalea/examples/testbot.rs
+++ b/azalea/examples/testbot.rs
@@ -284,12 +284,11 @@ async fn handle(mut bot: Client, event: Event, _state: State) -> anyhow::Result<
_ => {}
}
}
- Event::Packet(packet) => match *packet {
- ClientboundGamePacket::Login(_) => {
+ Event::Packet(packet) => {
+ if let ClientboundGamePacket::Login(_) = *packet {
println!("login packet");
}
- _ => {}
- },
+ }
_ => {}
}