tool: Update toolchain, edition, deps

- Update toolchain to nightly-2023-09-07
- Update edition to 2021
- Update deps

`OpenHidDeviceError` is deprecated, and is removed in newer versions.
Replace it with `HidApiErrorEmpty`, because there are no descriptions
for what anything means so I just picked one that didn't require fields.

Signed-off-by: Tim Crawford <tcrawford@system76.com>
This commit is contained in:
Tim Crawford
2023-10-05 10:05:34 -06:00
committed by Jeremy Soller
parent c461e20df3
commit 782f18a3f6
4 changed files with 24 additions and 23 deletions

View File

@ -1,3 +1,3 @@
[toolchain]
channel = "nightly-2023-01-21"
channel = "nightly-2023-09-07"
components = ["rust-src"]

35
tool/Cargo.lock generated
View File

@ -27,15 +27,18 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
[[package]]
name = "cc"
version = "1.0.79"
version = "1.0.83"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f"
checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0"
dependencies = [
"libc",
]
[[package]]
name = "clap"
version = "3.2.23"
version = "3.2.25"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "71655c45cb9845d3270c9d6df84ebe72b4dad3c2ba3f7023ad47c144e4e473a5"
checksum = "4ea181bf566f71cb9a5d17a59e1871af638180a18fb0035c92ae62b705207123"
dependencies = [
"atty",
"bitflags",
@ -90,9 +93,9 @@ dependencies = [
[[package]]
name = "indexmap"
version = "1.9.2"
version = "1.9.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399"
checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99"
dependencies = [
"autocfg",
"hashbrown",
@ -100,21 +103,21 @@ dependencies = [
[[package]]
name = "libc"
version = "0.2.139"
version = "0.2.148"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "201de327520df007757c1f0adce6e827fe8562fbc28bfd9c15571c66ca1f5f79"
checksum = "9cdc71e17332e86d2e1d38c1f99edcb6288ee11b815fb1a4b049eaa2114d369b"
[[package]]
name = "os_str_bytes"
version = "6.4.1"
version = "6.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9b7820b9daea5457c9f21c69448905d723fbd21136ccf521748f23fd49e723ee"
checksum = "4d5d9eb14b174ee9aa2ef96dc2b94637a2d4b6e7cb873c7e171f0c20c6cf3eac"
[[package]]
name = "pkg-config"
version = "0.3.26"
version = "0.3.27"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6ac9a59f73473f1b8d852421e59e64809f025994837ef743615c6d0c5b305160"
checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964"
[[package]]
name = "redox_hwio"
@ -141,9 +144,9 @@ dependencies = [
[[package]]
name = "termcolor"
version = "1.2.0"
version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6"
checksum = "6093bad37da69aab9d123a8091e4be0aa4a03e4d601ec641c327398315f62b64"
dependencies = [
"winapi-util",
]
@ -172,9 +175,9 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
[[package]]
name = "winapi-util"
version = "0.1.5"
version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178"
checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596"
dependencies = [
"winapi",
]

View File

@ -1,7 +1,7 @@
[package]
name = "system76_ectool"
version = "0.3.8"
edition = "2018"
edition = "2021"
description = "System76 EC tool"
license = "MIT"
authors = ["Jeremy Soller <jeremy@system76.com>"]
@ -18,7 +18,8 @@ required-features = ["std", "hidapi", "clap"]
[dependencies]
clap = { version = "3.2", optional = true }
libc = { version = "0.2", optional = true }
hidapi = { version = "1.4", default-features = false, features = ["linux-shared-hidraw"], optional = true }
# NOTE: Upgrading to 2.x blocked on Ubuntu shipping newer hidapi
hidapi = { version = "1.5", default-features = false, features = ["linux-shared-hidraw"], optional = true }
redox_hwio = { version = "0.1.6", default-features = false, optional = true }
downcast-rs = { version = "1.2.0", default-features = false }
@ -28,6 +29,3 @@ std = ["libc", "downcast-rs/std"]
[package.metadata.docs.rs]
all-features = true
[registries.crates-io]
protocol = "sparse"

View File

@ -428,7 +428,7 @@ fn main() {
_ => {},
}
}
Err(hidapi::HidError::OpenHidDeviceError.into())
Err(hidapi::HidError::HidApiErrorEmpty.into())
}
_ => unreachable!(),
}