diff --git a/bestool/.gitignore b/bestool/.gitignore
new file mode 100644
index 0000000..9f11b75
--- /dev/null
+++ b/bestool/.gitignore
@@ -0,0 +1 @@
+.idea/
diff --git a/bestool/.idea/.gitignore b/bestool/.idea/.gitignore
deleted file mode 100644
index 13566b8..0000000
--- a/bestool/.idea/.gitignore
+++ /dev/null
@@ -1,8 +0,0 @@
-# Default ignored files
-/shelf/
-/workspace.xml
-# Editor-based HTTP Client requests
-/httpRequests/
-# Datasource local storage ignored files
-/dataSources/
-/dataSources.local.xml
diff --git a/bestool/.idea/bestool.iml b/bestool/.idea/bestool.iml
deleted file mode 100644
index c254557..0000000
--- a/bestool/.idea/bestool.iml
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/bestool/.idea/modules.xml b/bestool/.idea/modules.xml
deleted file mode 100644
index 70cf243..0000000
--- a/bestool/.idea/modules.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/bestool/.idea/vcs.xml b/bestool/.idea/vcs.xml
deleted file mode 100644
index 6c0b863..0000000
--- a/bestool/.idea/vcs.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/bestool/Cargo.lock b/bestool/Cargo.lock
index 465c7e3..65b59f9 100644
--- a/bestool/Cargo.lock
+++ b/bestool/Cargo.lock
@@ -13,9 +13,9 @@ dependencies = [
[[package]]
name = "anstream"
-version = "0.6.11"
+version = "0.6.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6e2e1ebcb11de5c03c67de28a7df593d32191b44939c482e97702baaaa6ab6a5"
+checksum = "d96bd03f33fe50a863e394ee9718a706f988b9079b20c3784fb726e7678b62fb"
dependencies = [
"anstyle",
"anstyle-parse",
@@ -66,7 +66,6 @@ dependencies = [
"clap",
"crc",
"serialport",
- "thiserror",
"tracing",
"tracing-subscriber",
]
@@ -206,9 +205,9 @@ dependencies = [
[[package]]
name = "log"
-version = "0.4.20"
+version = "0.4.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f"
+checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c"
[[package]]
name = "mach2"
@@ -365,9 +364,9 @@ checksum = "5ee073c9e4cd00e28217186dbe12796d692868f432bf2e97ee73bed0c56dfa01"
[[package]]
name = "syn"
-version = "2.0.49"
+version = "2.0.52"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "915aea9e586f80826ee59f8453c1101f9d1c4b3964cd2460185ee8e299ada496"
+checksum = "b699d15b36d1f02c3e7c69f8ffef53de37aefae075d8488d4ba1a7788d574a07"
dependencies = [
"proc-macro2",
"quote",
@@ -396,9 +395,9 @@ dependencies = [
[[package]]
name = "thread_local"
-version = "1.1.7"
+version = "1.1.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3fdd6f064ccff2d6567adcb3873ca630700f00b5ad3f060c25b5dcfd9a4ce152"
+checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c"
dependencies = [
"cfg-if",
"once_cell",
@@ -521,9 +520,9 @@ dependencies = [
[[package]]
name = "windows-targets"
-version = "0.52.0"
+version = "0.52.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd"
+checksum = "7dd37b7e5ab9018759f893a1952c9420d060016fc19a472b4bb20d1bdd694d1b"
dependencies = [
"windows_aarch64_gnullvm",
"windows_aarch64_msvc",
@@ -536,42 +535,42 @@ dependencies = [
[[package]]
name = "windows_aarch64_gnullvm"
-version = "0.52.0"
+version = "0.52.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea"
+checksum = "bcf46cf4c365c6f2d1cc93ce535f2c8b244591df96ceee75d8e83deb70a9cac9"
[[package]]
name = "windows_aarch64_msvc"
-version = "0.52.0"
+version = "0.52.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef"
+checksum = "da9f259dd3bcf6990b55bffd094c4f7235817ba4ceebde8e6d11cd0c5633b675"
[[package]]
name = "windows_i686_gnu"
-version = "0.52.0"
+version = "0.52.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313"
+checksum = "b474d8268f99e0995f25b9f095bc7434632601028cf86590aea5c8a5cb7801d3"
[[package]]
name = "windows_i686_msvc"
-version = "0.52.0"
+version = "0.52.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a"
+checksum = "1515e9a29e5bed743cb4415a9ecf5dfca648ce85ee42e15873c3cd8610ff8e02"
[[package]]
name = "windows_x86_64_gnu"
-version = "0.52.0"
+version = "0.52.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd"
+checksum = "5eee091590e89cc02ad514ffe3ead9eb6b660aedca2183455434b93546371a03"
[[package]]
name = "windows_x86_64_gnullvm"
-version = "0.52.0"
+version = "0.52.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e"
+checksum = "77ca79f2451b49fa9e2af39f0747fe999fcda4f5e241b2898624dca97a1f2177"
[[package]]
name = "windows_x86_64_msvc"
-version = "0.52.0"
+version = "0.52.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04"
+checksum = "32b752e52a2da0ddfbdbcc6fceadfeede4c939ed16d13e648833a61dfb611ed8"
diff --git a/bestool/Cargo.toml b/bestool/Cargo.toml
index 380c073..d5db8a2 100644
--- a/bestool/Cargo.toml
+++ b/bestool/Cargo.toml
@@ -8,7 +8,11 @@ edition = "2021"
[dependencies]
serialport = "4.2.2"
clap = { version = "4.4.8", features = ["derive"] }
-thiserror = "1.0.50"
tracing = "0.1.40"
tracing-subscriber = "0.3.18"
crc = "3.0.1"
+
+
+[profile.release]
+lto = "fat"
+build-override.codegen-units = 1
diff --git a/bestool/src/beslink/errors.rs b/bestool/src/beslink/errors.rs
index 75bbe91..7173034 100644
--- a/bestool/src/beslink/errors.rs
+++ b/bestool/src/beslink/errors.rs
@@ -1,25 +1,25 @@
-use thiserror::Error;
-
-#[derive(Error, Debug)]
+#[derive(Debug)]
pub enum BESLinkError {
- #[error("IOError")]
- IOError(#[from] std::io::Error),
- #[error("SerialPortError")]
- SerialPortError(#[from] serialport::Error),
- #[error("BadChecksumError Bad checksum; got {got:?} wanted {wanted:?} : {failed_packet:X?}")]
+ IOError {
+ e: std::io::Error,
+ },
BadChecksumError {
failed_packet: Vec,
got: u8,
wanted: u8,
},
- #[error("BadResponseCode Bad result; got {got:?} wanted {wanted:?} : {failed_packet:X?}")]
BadResponseCode {
failed_packet: Vec,
got: u8,
wanted: u8,
},
- #[error("Invalid Argument")]
InvalidArgs,
// #[error("Communications timed out")]
// Timeout,
}
+
+impl From for BESLinkError {
+ fn from(value: std::io::Error) -> Self {
+ Self::IOError { e: value }
+ }
+}
diff --git a/bestool/src/beslink/sync.rs b/bestool/src/beslink/sync.rs
index 6f19cc8..31f854f 100644
--- a/bestool/src/beslink/sync.rs
+++ b/bestool/src/beslink/sync.rs
@@ -24,13 +24,10 @@ pub fn sync(
}
}
Err(e) => match e {
- BESLinkError::IOError(_) => return Err(e),
- BESLinkError::SerialPortError(_) => return Err(e),
BESLinkError::BadChecksumError { .. } => {
warn!("Ignoring bad checksum; you might not be in programmer mode.")
}
- BESLinkError::BadResponseCode { .. } => return Err(e),
- BESLinkError::InvalidArgs => return Err(e),
+ _ => return Err(e),
},
}
}
diff --git a/bestool/supply-chain/audits.toml b/bestool/supply-chain/audits.toml
index 29f91fd..0e2e660 100644
--- a/bestool/supply-chain/audits.toml
+++ b/bestool/supply-chain/audits.toml
@@ -11,6 +11,11 @@ who = "Ben V. Brown "
criteria = "safe-to-deploy"
version = "0.4.0"
+[[audits.log]]
+who = "Ben V. Brown "
+criteria = "safe-to-deploy"
+delta = "0.4.20 -> 0.4.21"
+
[[audits.pkg-config]]
who = "Ben V. Brown "
criteria = "safe-to-deploy"
diff --git a/bestool/supply-chain/imports.lock b/bestool/supply-chain/imports.lock
index 595672a..d9332b8 100644
--- a/bestool/supply-chain/imports.lock
+++ b/bestool/supply-chain/imports.lock
@@ -9,8 +9,8 @@ user-login = "BurntSushi"
user-name = "Andrew Gallant"
[[publisher.anstream]]
-version = "0.6.11"
-when = "2024-01-18"
+version = "0.6.13"
+when = "2024-02-27"
user-id = 6743
user-login = "epage"
user-name = "Ed Page"
@@ -156,8 +156,8 @@ user-login = "mbrubeck"
user-name = "Matt Brubeck"
[[publisher.syn]]
-version = "2.0.49"
-when = "2024-02-16"
+version = "2.0.52"
+when = "2024-02-28"
user-id = 3618
user-login = "dtolnay"
user-name = "David Tolnay"
@@ -177,8 +177,8 @@ user-login = "dtolnay"
user-name = "David Tolnay"
[[publisher.thread_local]]
-version = "1.1.7"
-when = "2023-02-12"
+version = "1.1.8"
+when = "2024-02-20"
user-id = 2915
user-login = "Amanieu"
user-name = "Amanieu d'Antras"
@@ -205,57 +205,57 @@ user-login = "kennykerr"
user-name = "Kenny Kerr"
[[publisher.windows-targets]]
-version = "0.52.0"
-when = "2023-11-15"
+version = "0.52.4"
+when = "2024-02-28"
user-id = 64539
user-login = "kennykerr"
user-name = "Kenny Kerr"
[[publisher.windows_aarch64_gnullvm]]
-version = "0.52.0"
-when = "2023-11-15"
+version = "0.52.4"
+when = "2024-02-28"
user-id = 64539
user-login = "kennykerr"
user-name = "Kenny Kerr"
[[publisher.windows_aarch64_msvc]]
-version = "0.52.0"
-when = "2023-11-15"
+version = "0.52.4"
+when = "2024-02-28"
user-id = 64539
user-login = "kennykerr"
user-name = "Kenny Kerr"
[[publisher.windows_i686_gnu]]
-version = "0.52.0"
-when = "2023-11-15"
+version = "0.52.4"
+when = "2024-02-28"
user-id = 64539
user-login = "kennykerr"
user-name = "Kenny Kerr"
[[publisher.windows_i686_msvc]]
-version = "0.52.0"
-when = "2023-11-15"
+version = "0.52.4"
+when = "2024-02-28"
user-id = 64539
user-login = "kennykerr"
user-name = "Kenny Kerr"
[[publisher.windows_x86_64_gnu]]
-version = "0.52.0"
-when = "2023-11-15"
+version = "0.52.4"
+when = "2024-02-28"
user-id = 64539
user-login = "kennykerr"
user-name = "Kenny Kerr"
[[publisher.windows_x86_64_gnullvm]]
-version = "0.52.0"
-when = "2023-11-15"
+version = "0.52.4"
+when = "2024-02-28"
user-id = 64539
user-login = "kennykerr"
user-name = "Kenny Kerr"
[[publisher.windows_x86_64_msvc]]
-version = "0.52.0"
-when = "2023-11-15"
+version = "0.52.4"
+when = "2024-02-28"
user-id = 64539
user-login = "kennykerr"
user-name = "Kenny Kerr"