Skip to content

Commit b8fa1c7

Browse files
committed
Revert ddf6363
1 parent 8de175b commit b8fa1c7

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
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.22"
58+
version = "0.13"
5959
optional = true
6060

6161
[dependencies.futures]

rust/sbp/src/sbp_string.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,11 @@ 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-
if two == &0 && one == &0 {
106-
return Ok(SbpString::new(vec));
107-
}
104+
if let [.., two, one] = vec.as_slice()
105+
&& two == &0
106+
&& one == &0
107+
{
108+
return Ok(SbpString::new(vec));
108109
};
109110
Err(DoubleNullTerminatedError)
110111
}

0 commit comments

Comments
 (0)