small tweaks
This commit is contained in:
parent
d152e0da61
commit
fecf6ebed5
|
@ -305,6 +305,7 @@ fn main() -> Result<(), Box<dyn Error>> {
|
||||||
// figure out where we should be
|
// figure out where we should be
|
||||||
// deltas has either 2 or 3 days, if 3 then the middle one is == 0 (i.e. today)
|
// deltas has either 2 or 3 days, if 3 then the middle one is == 0 (i.e. today)
|
||||||
let deltas: Vec<i64> = nearest_plenum_days.iter().map(|&d| (d - today).num_days()).collect();
|
let deltas: Vec<i64> = nearest_plenum_days.iter().map(|&d| (d - today).num_days()).collect();
|
||||||
|
trace_var!(deltas);
|
||||||
// find the relevant one:
|
// find the relevant one:
|
||||||
let delta = *match last_state {
|
let delta = *match last_state {
|
||||||
// In normal state, the past doesn't matter – just pick the next occurrence.
|
// In normal state, the past doesn't matter – just pick the next occurrence.
|
||||||
|
@ -748,6 +749,7 @@ type TransitionFunction = fn(
|
||||||
|
|
||||||
#[rustfmt::skip]
|
#[rustfmt::skip]
|
||||||
const TRANSITION_LUT: [[ST; 5]; 5] = [
|
const TRANSITION_LUT: [[ST; 5]; 5] = [
|
||||||
|
/* vvv IS vvv | >>> SHOULD >>> */
|
||||||
/* NORMAL ANNOUNCED REMINDED WAITING LOGGED */
|
/* NORMAL ANNOUNCED REMINDED WAITING LOGGED */
|
||||||
/* NORMAL */ [ST::Nop, ST::DoAnnouncement, ST::DoReminder, ST::Nop, ST::Nop],
|
/* NORMAL */ [ST::Nop, ST::DoAnnouncement, ST::DoReminder, ST::Nop, ST::Nop],
|
||||||
/* ANNOUNCED */ [ST::DoCleanup, ST::Nop, ST::DoReminder, ST::Nop, ST::DoProtocol],
|
/* ANNOUNCED */ [ST::DoCleanup, ST::Nop, ST::DoReminder, ST::Nop, ST::DoProtocol],
|
||||||
|
|
Loading…
Reference in a new issue