From 20bffaa976421fc03f788687b73ff78f3c4400c9 Mon Sep 17 00:00:00 2001 From: Robert Zieba Date: Thu, 6 Mar 2025 16:09:29 -0700 Subject: [PATCH] Update for bincode 2.0.0 --- .github/workflows/check.yml | 3 ++- Cargo.toml | 4 +--- src/command.rs | 4 ++-- src/lib.rs | 3 +-- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index dd8bc44..ab17055 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -204,7 +204,7 @@ jobs: fail-fast: false matrix: commit: ${{ fromJSON(needs.commit_list.outputs.commits) }} - msrv: ["1.83"] # We're relying on namespaced-features, which + msrv: ["1.85"] # We're relying on namespaced-features, which # was released in 1.60 # # We also depend on `fixed' which requires rust @@ -215,6 +215,7 @@ jobs: # # embassy-time requires 1.79 due to # collapse_debuginfo + # bincode requires 1.85 name: ubuntu / ${{ matrix.msrv }} (${{ matrix.commit }}) steps: - uses: actions/checkout@v4 diff --git a/Cargo.toml b/Cargo.toml index 74ab683..f6accf9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,9 +17,7 @@ defmt = { version = "0.3.0", optional = true } log = { version = "0.4.14", optional = true } embassy-sync = { git = "https://github.com/embassy-rs/embassy", optional = true } embassy-time = { git = "https://github.com/embassy-rs/embassy", optional = true } -bincode = { version = "2.0.0-rc.3", default-features = false, features = [ - "derive", -] } +bincode = { version = "2.0.0", default-features = false, features = ["derive"] } [features] default = [] diff --git a/src/command.rs b/src/command.rs index 6095526..9b380a7 100644 --- a/src/command.rs +++ b/src/command.rs @@ -302,7 +302,7 @@ impl TryFrom for TfuqBlockStatus { } } -impl Decode for TfuqBlockStatus { +impl Decode for TfuqBlockStatus { fn decode(decoder: &mut D) -> Result { let val: u8 = Decode::decode(decoder)?; TfuqBlockStatus::try_from(val).map_err(|_| DecodeError::Other("Invalid TfuqBlockStatus")) @@ -342,7 +342,7 @@ pub struct TfuqReturnValue { pub num_of_app_config_updates: u16, } -impl Decode for TfuqReturnValue { +impl Decode for TfuqReturnValue { fn decode(decoder: &mut D) -> Result { let active_host = Decode::decode(decoder)?; let current_state = Decode::decode(decoder)?; diff --git a/src/lib.rs b/src/lib.rs index 8a23e35..74ee215 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -26,8 +26,7 @@ pub const PORT1: PortId = PortId(1); pub mod registers { use device_driver; - use embedded_usb_pd::type_c; - use embedded_usb_pd::PdError; + use embedded_usb_pd::{type_c, PdError}; device_driver::create_device!( device_name: Registers, manifest: "device.yaml"