diff --git a/Cargo.lock b/Cargo.lock --- a/Cargo.lock +++ b/Cargo.lock @@ -873,9 +873,9 @@ [[package]] name = "quote" -version = "1.0.44" +version = "1.0.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21b2ebcf727b7760c461f091f9f0f539b77b8e87f2fd88131e7f1b433b3cece4" +checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924" dependencies = [ "proc-macro2", ] diff --git a/Cargo.toml b/Cargo.toml --- a/Cargo.toml +++ b/Cargo.toml @@ -8,7 +8,7 @@ repository = "https://tangled.org/sachy.dev/strike-sensor" version = "0.1.0" license = "MPL-2.0" -rust-version = "1.91.0" +rust-version = "1.94.0" [workspace.dependencies] embassy-time = "0.5" diff --git a/.tangled/workflows/test.yml b/.tangled/workflows/test.yml --- a/.tangled/workflows/test.yml +++ b/.tangled/workflows/test.yml @@ -7,12 +7,13 @@ dependencies: nixpkgs: - clang - - cargo + - rustup - rustfmt - - protobuf - cargo-nextest steps: + - name: Install latest stable + command: rustup toolchain install stable - name: Format check command: cargo fmt --all --check - name: Tests diff --git a/embassy-strike-driver/src/analysis.rs b/embassy-strike-driver/src/analysis.rs --- a/embassy-strike-driver/src/analysis.rs +++ b/embassy-strike-driver/src/analysis.rs @@ -12,7 +12,11 @@ let mut total = 0u32; let mut len = 0u32; - for (i, window) in buf.windows(CHUNK_SIZE).enumerate().step_by(CHUNK_STEP) { + for (i, window) in buf + .array_windows::() + .enumerate() + .step_by(CHUNK_STEP) + { let (window_total, window_diff) = window .iter()