Skip to content

Commit

Permalink
Update for bincode 2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
RobertZ2011 committed Mar 6, 2025
1 parent 979da3d commit 20bffaa
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 8 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
4 changes: 1 addition & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 = []
Expand Down
4 changes: 2 additions & 2 deletions src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ impl TryFrom<u8> for TfuqBlockStatus {
}
}

impl Decode for TfuqBlockStatus {
impl<Context> Decode<Context> for TfuqBlockStatus {
fn decode<D: Decoder>(decoder: &mut D) -> Result<Self, DecodeError> {
let val: u8 = Decode::decode(decoder)?;
TfuqBlockStatus::try_from(val).map_err(|_| DecodeError::Other("Invalid TfuqBlockStatus"))
Expand Down Expand Up @@ -342,7 +342,7 @@ pub struct TfuqReturnValue {
pub num_of_app_config_updates: u16,
}

impl Decode for TfuqReturnValue {
impl<Context> Decode<Context> for TfuqReturnValue {
fn decode<D: Decoder>(decoder: &mut D) -> Result<Self, DecodeError> {
let active_host = Decode::decode(decoder)?;
let current_state = Decode::decode(decoder)?;
Expand Down
3 changes: 1 addition & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 20bffaa

Please sign in to comment.