diff --git a/embedded-can/CHANGELOG.md b/embedded-can/CHANGELOG.md index f8719d63..5e623528 100644 --- a/embedded-can/CHANGELOG.md +++ b/embedded-can/CHANGELOG.md @@ -9,6 +9,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - Added `core::error::Error` implementations for every custom `impl Error` - Increased MSRV to 1.81 due to `core::error::Error` +- Bumped `defmt` to v1 +- `defmt-03` feature is now named `defmt` ## [v0.4.1] - 2022-09-28 diff --git a/embedded-can/Cargo.toml b/embedded-can/Cargo.toml index 105f286b..7a638db0 100644 --- a/embedded-can/Cargo.toml +++ b/embedded-can/Cargo.toml @@ -14,7 +14,4 @@ repository = "https://github.com/rust-embedded/embedded-hal" [dependencies] nb = "1" -defmt = { version = "0.3", optional = true } - -[features] -defmt-03 = ["dep:defmt"] +defmt = { version = "1", optional = true } diff --git a/embedded-can/src/id.rs b/embedded-can/src/id.rs index b0d6d4d5..3f96474f 100644 --- a/embedded-can/src/id.rs +++ b/embedded-can/src/id.rs @@ -2,7 +2,7 @@ /// Standard 11-bit CAN Identifier (`0..=0x7FF`). #[derive(Debug, Copy, Clone, Eq, PartialEq, PartialOrd, Ord, Hash)] -#[cfg_attr(feature = "defmt-03", derive(defmt::Format))] +#[cfg_attr(feature = "defmt", derive(defmt::Format))] pub struct StandardId(u16); impl StandardId { @@ -45,7 +45,7 @@ impl StandardId { /// Extended 29-bit CAN Identifier (`0..=1FFF_FFFF`). #[derive(Debug, Copy, Clone, Eq, PartialEq, PartialOrd, Ord, Hash)] -#[cfg_attr(feature = "defmt-03", derive(defmt::Format))] +#[cfg_attr(feature = "defmt", derive(defmt::Format))] pub struct ExtendedId(u32); impl ExtendedId { @@ -95,7 +95,7 @@ impl ExtendedId { /// A CAN Identifier (standard or extended). #[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -#[cfg_attr(feature = "defmt-03", derive(defmt::Format))] +#[cfg_attr(feature = "defmt", derive(defmt::Format))] pub enum Id { /// Standard 11-bit Identifier (`0..=0x7FF`). Standard(StandardId), diff --git a/embedded-can/src/lib.rs b/embedded-can/src/lib.rs index bb010b96..86248f3c 100644 --- a/embedded-can/src/lib.rs +++ b/embedded-can/src/lib.rs @@ -73,7 +73,7 @@ impl Error for core::convert::Infallible { /// free to define more specific or additional error types. However, by providing /// a mapping to these common CAN errors, generic code can still react to them. #[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)] -#[cfg_attr(feature = "defmt-03", derive(defmt::Format))] +#[cfg_attr(feature = "defmt", derive(defmt::Format))] #[non_exhaustive] pub enum ErrorKind { /// The peripheral receive buffer was overrun.