Skip to content

Commit 368b5dc

Browse files
authored
Merge pull request #710 from us-irs/bump-defmt-for-can
embedded-can: bump defmt to v1, rename feature from defmt-03 to defmt
2 parents 21e547a + f9bfce5 commit 368b5dc

File tree

4 files changed

+7
-8
lines changed

4 files changed

+7
-8
lines changed

embedded-can/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
99

1010
- Added `core::error::Error` implementations for every custom `impl Error`
1111
- Increased MSRV to 1.81 due to `core::error::Error`
12+
- Bumped `defmt` to v1
13+
- `defmt-03` feature is now named `defmt`
1214

1315
## [v0.4.1] - 2022-09-28
1416

embedded-can/Cargo.toml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,4 @@ repository = "https://github.com/rust-embedded/embedded-hal"
1414

1515
[dependencies]
1616
nb = "1"
17-
defmt = { version = "0.3", optional = true }
18-
19-
[features]
20-
defmt-03 = ["dep:defmt"]
17+
defmt = { version = "1", optional = true }

embedded-can/src/id.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
33
/// Standard 11-bit CAN Identifier (`0..=0x7FF`).
44
#[derive(Debug, Copy, Clone, Eq, PartialEq, PartialOrd, Ord, Hash)]
5-
#[cfg_attr(feature = "defmt-03", derive(defmt::Format))]
5+
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
66
pub struct StandardId(u16);
77

88
impl StandardId {
@@ -45,7 +45,7 @@ impl StandardId {
4545

4646
/// Extended 29-bit CAN Identifier (`0..=1FFF_FFFF`).
4747
#[derive(Debug, Copy, Clone, Eq, PartialEq, PartialOrd, Ord, Hash)]
48-
#[cfg_attr(feature = "defmt-03", derive(defmt::Format))]
48+
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
4949
pub struct ExtendedId(u32);
5050

5151
impl ExtendedId {
@@ -95,7 +95,7 @@ impl ExtendedId {
9595

9696
/// A CAN Identifier (standard or extended).
9797
#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)]
98-
#[cfg_attr(feature = "defmt-03", derive(defmt::Format))]
98+
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
9999
pub enum Id {
100100
/// Standard 11-bit Identifier (`0..=0x7FF`).
101101
Standard(StandardId),

embedded-can/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ impl Error for core::convert::Infallible {
7373
/// free to define more specific or additional error types. However, by providing
7474
/// a mapping to these common CAN errors, generic code can still react to them.
7575
#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
76-
#[cfg_attr(feature = "defmt-03", derive(defmt::Format))]
76+
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
7777
#[non_exhaustive]
7878
pub enum ErrorKind {
7979
/// The peripheral receive buffer was overrun.

0 commit comments

Comments
 (0)