Skip to content

Commit 1c75bce

Browse files
tommy-gilliganjessebraham
authored andcommitted
Switch to binrw from unmaintained binread
1 parent 28fab99 commit 1c75bce

File tree

4 files changed

+24
-16
lines changed

4 files changed

+24
-16
lines changed

Cargo.lock

Lines changed: 17 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

espflash/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ required-features = ["cli"]
3333
[dependencies]
3434
addr2line = { version = "0.20.0", optional = true }
3535
base64 = "0.21.2"
36-
binread = "2.2.0"
36+
binrw = "0.11.2"
3737
bytemuck = { version = "1.13.1", features = ["derive"] }
3838
clap = { version = "4.3.*", features = ["derive", "env", "wrap_help"], optional = true }
3939
clap_complete = { version = "4.3.*", optional = true }

espflash/src/connection.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
77
use std::{io::BufWriter, thread::sleep, time::Duration};
88

9-
use binread::{io::Cursor, BinRead, BinReaderExt};
9+
use binrw::{io::Cursor, BinRead, BinReaderExt};
1010
use log::info;
1111
use serialport::UsbPortInfo;
1212
use slip_codec::SlipDecoder;

espflash/src/error.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,8 @@ impl From<io::Error> for Error {
149149
}
150150
}
151151

152-
impl From<binread::Error> for Error {
153-
fn from(err: binread::Error) -> Self {
152+
impl From<binrw::Error> for Error {
153+
fn from(err: binrw::Error) -> Self {
154154
Self::Connection(err.into())
155155
}
156156
}
@@ -223,10 +223,10 @@ impl From<io::Error> for ConnectionError {
223223
}
224224
}
225225

226-
impl From<binread::Error> for ConnectionError {
227-
fn from(err: binread::Error) -> Self {
226+
impl From<binrw::Error> for ConnectionError {
227+
fn from(err: binrw::Error) -> Self {
228228
match err {
229-
binread::Error::Io(e) => ConnectionError::from(e),
229+
binrw::Error::Io(e) => ConnectionError::from(e),
230230
_ => unreachable!(),
231231
}
232232
}

0 commit comments

Comments
 (0)