1
Fork 0
mirror of https://github.com/redstrate/Kawari.git synced 2025-07-10 16:07:45 +00:00

Address "warning: you seem to be trying to use match for destructuring a single pattern. Consider using if let"

This commit is contained in:
The Dax 2025-06-30 20:32:41 -04:00 committed by Joshua Goins
parent 1fe3e3e81d
commit b0282eb6bc

View file

@ -309,20 +309,17 @@ pub async fn server_main_loop(mut recv: Receiver<ToServer>) -> Result<(), std::i
// handle player-to-server actions
if id == from_id {
match &trigger.trigger {
ClientTriggerCommand::TeleportQuery { aetheryte_id } => {
let msg = FromServer::ActorControlSelf(ActorControlSelf {
category: ActorControlCategory::TeleportStart {
insufficient_gil: 0,
aetheryte_id: *aetheryte_id,
},
});
if let ClientTriggerCommand::TeleportQuery { aetheryte_id } = &trigger.trigger {
let msg = FromServer::ActorControlSelf(ActorControlSelf {
category: ActorControlCategory::TeleportStart {
insufficient_gil: 0,
aetheryte_id: *aetheryte_id,
},
});
if handle.send(msg).is_err() {
to_remove.push(id);
}
if handle.send(msg).is_err() {
to_remove.push(id);
}
_ => {}
}
continue;
}