From 22d5ba87ff258abb26db92972535ade8636a418f Mon Sep 17 00:00:00 2001 From: Colin S <3526918+cbs228@users.noreply.github.com> Date: Mon, 20 Jan 2025 00:01:42 -0600 Subject: [PATCH] sameold: update MSRV and dependencies MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * MSRV → 1.70 * arraydeque → 0.5 * num-complex → 0.4 * thiserror → 2.0 Minor refactoring is required for arraydeque --- Cargo.lock | 27 ++++++++-------------- crates/sameold/Cargo.toml | 8 +++---- crates/sameold/src/receiver/codesquelch.rs | 4 ++-- crates/sameold/src/receiver/symsync.rs | 2 +- 4 files changed, 16 insertions(+), 25 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 716bba6..f0e0514 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -92,9 +92,9 @@ dependencies = [ [[package]] name = "arraydeque" -version = "0.4.5" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0ffd3d69bd89910509a5d31d1f1353f38ccffdd116dd0099bbd6627f7bd8ad8" +checksum = "7d902e3d592a523def97af8f317b08ce16b7ab854c1985a0c671e6f15cebc236" [[package]] name = "arrayvec" @@ -373,7 +373,7 @@ dependencies = [ "approx", "matrixmultiply", "nalgebra-macros", - "num-complex 0.4.6", + "num-complex", "num-rational", "num-traits", "simba", @@ -401,15 +401,6 @@ dependencies = [ "num-traits", ] -[[package]] -name = "num-complex" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "747d632c0c558b87dbabbe6a82f3b4ae03720d0646ac5b7b4dae89394be5f2c5" -dependencies = [ - "num-traits", -] - [[package]] name = "num-complex" version = "0.4.6" @@ -633,7 +624,7 @@ dependencies = [ "lazy_static", "log", "nalgebra", - "num-complex 0.3.1", + "num-complex", "num-traits", "phf", "regex", @@ -656,7 +647,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b3a386a501cd104797982c15ae17aafe8b9261315b5d07e3ec803f2ea26be0fa" dependencies = [ "approx", - "num-complex 0.4.6", + "num-complex", "num-traits", "paste", "wide", @@ -736,18 +727,18 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.69" +version = "2.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" +checksum = "d452f284b73e6d76dd36758a0c8684b1d5be31f92b89d07fd5822175732206fc" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.69" +version = "2.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" +checksum = "26afc1baea8a989337eeb52b6e72a039780ce45c3edfcc9c5b9d112feeb173c2" dependencies = [ "proc-macro2", "quote", diff --git a/crates/sameold/Cargo.toml b/crates/sameold/Cargo.toml index c884799..10b2834 100644 --- a/crates/sameold/Cargo.toml +++ b/crates/sameold/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sameold" -rust-version = "1.65" +rust-version = "1.70" description = "A SAME/EAS digital receiver library" version = "0.4.0" authors = ["Colin S <3526918+cbs228@users.noreply.github.com>"] @@ -12,19 +12,19 @@ readme = "README.md" [dependencies] arrayvec = "^0.7.1" -arraydeque = "^0.4.5" +arraydeque = "^0.5" assert_approx_eq = "1.1.0" lazy_static = "^1.4.0" log = "0.4" nalgebra = "^0.33.2" -num-complex = "^0.3.1" +num-complex = "^0.4" num-traits = "^0.2" phf = {version = "^0.11", features = ["macros"]} regex = "^1.5.5" slice-ring-buffer = "^0.3" strum = "^0.26" strum_macros = "^0.26" -thiserror = "^1.0" +thiserror = "^2.0" [dependencies.chrono] version = "^0.4" diff --git a/crates/sameold/src/receiver/codesquelch.rs b/crates/sameold/src/receiver/codesquelch.rs index e5a8dce..1853703 100644 --- a/crates/sameold/src/receiver/codesquelch.rs +++ b/crates/sameold/src/receiver/codesquelch.rs @@ -142,10 +142,10 @@ pub struct CodeAndPowerSquelch { power_track: PowerTracker, // sample history - sample_history: ArrayDeque<[f32; 64], arraydeque::Wrapping>, + sample_history: ArrayDeque, // power threshold history - power_history: ArrayDeque<[bool; 32], arraydeque::Wrapping>, + power_history: ArrayDeque, // lifetime total count of symbols received symbol_counter: u64, diff --git a/crates/sameold/src/receiver/symsync.rs b/crates/sameold/src/receiver/symsync.rs index 569c5bb..bb7b0b9 100644 --- a/crates/sameold/src/receiver/symsync.rs +++ b/crates/sameold/src/receiver/symsync.rs @@ -247,7 +247,7 @@ impl TimingLoop { /// Zero-crossing timing error detector #[derive(Clone, Debug)] pub struct ZeroCrossingTed { - history: ArrayDeque<[f32; 3], arraydeque::Wrapping>, + history: ArrayDeque, sample_counter: u32, }