Skip to content

Commit ddf6363

Browse files
authored
Reverts let chain usage because not supported until rust 2024 (#1525)
# Description @swift-nav/algint-team minor change to rust conditional stuff # API compatibility Does this change introduce a API compatibility risk? No ## API compatibility plan If the above is "Yes", please detail the compatibility (or migration) plan: None # JIRA Reference n/a done to unblock a release
1 parent 5ecb7fc commit ddf6363

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

rust/sbp/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ version = "0.4"
5555
optional = true
5656

5757
[dependencies.base64]
58-
version = "0.13"
58+
version = "0.22"
5959
optional = true
6060

6161
[dependencies.futures]

rust/sbp/src/sbp_string.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,11 +101,10 @@ impl SbpString<Vec<u8>, DoubleNullTerminated> {
101101
data: impl Into<Vec<u8>>,
102102
) -> Result<Self, DoubleNullTerminatedError> {
103103
let vec = data.into();
104-
if let [.., two, one] = vec.as_slice()
105-
&& two == &0
106-
&& one == &0
107-
{
108-
return Ok(SbpString::new(vec));
104+
if let [.., two, one] = vec.as_slice() {
105+
if two == &0 && one == &0 {
106+
return Ok(SbpString::new(vec));
107+
}
109108
};
110109
Err(DoubleNullTerminatedError)
111110
}

0 commit comments

Comments
 (0)