From ebb19473f628d990f473f9e24030715e981ac919 Mon Sep 17 00:00:00 2001 From: Patrick Crumley Date: Tue, 28 Oct 2025 11:58:46 -0700 Subject: [PATCH 1/3] Reverts let chain usage because not supported until rust 2024 --- rust/sbp/src/sbp_string.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/rust/sbp/src/sbp_string.rs b/rust/sbp/src/sbp_string.rs index a80e61f9f8..880bb376a0 100644 --- a/rust/sbp/src/sbp_string.rs +++ b/rust/sbp/src/sbp_string.rs @@ -101,11 +101,10 @@ impl SbpString, DoubleNullTerminated> { data: impl Into>, ) -> Result { let vec = data.into(); - if let [.., two, one] = vec.as_slice() - && two == &0 - && one == &0 - { - return Ok(SbpString::new(vec)); + if let [.., &two, &one] = vec.as_slice() { + if two = 0 && one == 0 { + return Ok(SbpString::new(vec)); + } }; Err(DoubleNullTerminatedError) } From ab688662bd98a80ba8e15c7ecea594f1c378d6e8 Mon Sep 17 00:00:00 2001 From: Patrick Crumley Date: Tue, 28 Oct 2025 12:03:28 -0700 Subject: [PATCH 2/3] i should have tested locally --- rust/sbp/src/sbp_string.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rust/sbp/src/sbp_string.rs b/rust/sbp/src/sbp_string.rs index 880bb376a0..0256b46ab7 100644 --- a/rust/sbp/src/sbp_string.rs +++ b/rust/sbp/src/sbp_string.rs @@ -101,8 +101,8 @@ impl SbpString, DoubleNullTerminated> { data: impl Into>, ) -> Result { let vec = data.into(); - if let [.., &two, &one] = vec.as_slice() { - if two = 0 && one == 0 { + if let [.., two, one] = vec.as_slice() { + if two == &0 && one == &0 { return Ok(SbpString::new(vec)); } }; From 662b527d79968d0ddc06ec180e12cd88740f09a0 Mon Sep 17 00:00:00 2001 From: Patrick Crumley Date: Tue, 28 Oct 2025 12:27:45 -0700 Subject: [PATCH 3/3] bump base64 --- rust/sbp/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust/sbp/Cargo.toml b/rust/sbp/Cargo.toml index 29519bc316..7b73601bb7 100644 --- a/rust/sbp/Cargo.toml +++ b/rust/sbp/Cargo.toml @@ -55,7 +55,7 @@ version = "0.4" optional = true [dependencies.base64] -version = "0.13" +version = "0.22" optional = true [dependencies.futures]