Another round of optimization
Some checks failed
Deploy Website / deploy (push) Failing after 4m47s

This commit is contained in:
2026-02-02 22:16:00 +01:00
parent 8024c18bb0
commit 8c31ed4196
7 changed files with 122 additions and 70 deletions

View File

@@ -4,7 +4,7 @@ use rand::SeedableRng;
use std::collections::HashMap;
use std::sync::{Arc, Mutex};
pub fn default_ctx() -> StepContext {
pub fn default_ctx() -> StepContext<'static> {
StepContext {
step: 0,
beat: 0.0,
@@ -19,10 +19,12 @@ pub fn default_ctx() -> StepContext {
fill: false,
nudge_secs: 0.0,
cc_access: None,
speed_key: "__speed_0_0__",
chain_key: "__chain_0_0__",
}
}
pub fn ctx_with(f: impl FnOnce(&mut StepContext)) -> StepContext {
pub fn ctx_with(f: impl FnOnce(&mut StepContext<'static>)) -> StepContext<'static> {
let mut ctx = default_ctx();
f(&mut ctx);
ctx