style: cargo fmt sweep under rustc 1.97.1 (toolchain reformat, no semantic change)

This commit is contained in:
smarm-agent
2026-08-13 05:56:49 +00:00
parent 1262cc30e3
commit 95306c7f60
71 changed files with 1956 additions and 763 deletions
+8 -8
View File
@@ -35,8 +35,8 @@
#![deny(dead_code, unreachable_patterns)]
use smarm::gen_statem::{spawn, Cx, GenStatemRef, Machine, Reply, Resolution, Step};
use smarm::run;
use smarm::gen_statem::{spawn, Cx, Machine, Reply, Resolution, Step, GenStatemRef};
// === user types ============================================================
@@ -123,7 +123,11 @@ impl DoorSm {
fn start(init: Door) -> GenStatemRef<DoorSm> {
spawn(DoorSm {
state: init,
data: Data { enters: 0, pushes: 0, knocks: 0 },
data: Data {
enters: 0,
pushes: 0,
knocks: 0,
},
})
}
@@ -193,16 +197,12 @@ impl Machine for DoorSm {
(Door::Closed, Ev::Cast(Cast::Push | Cast::Unlock(_))) => Resolution::Unhandled,
// --- Locked (branching row: handler picks within UnlockOutcome) -
(Door::Locked, Ev::Cast(Cast::Unlock(key))) => {
Resolution::To(on_unlock(key).into())
}
(Door::Locked, Ev::Cast(Cast::Unlock(key))) => Resolution::To(on_unlock(key).into()),
// Routed out in phase 1; listed only to keep this match total.
(Door::Locked, Ev::Cast(Cast::Knock)) => {
unreachable!("postponed event is replayed, not dispatched here")
}
(Door::Locked, Ev::Cast(Cast::Push | Cast::Pull | Cast::Lock)) => {
Resolution::Unhandled
}
(Door::Locked, Ev::Cast(Cast::Push | Cast::Pull | Cast::Lock)) => Resolution::Unhandled,
// --- state-independent queries (reply, then stay) ---------------
(_, Ev::Call(Call::GetState(r))) => {