Skip to content

Commit 1c79a57

Browse files
Merge pull request #1007 from phycrax/impl-format-fmterror
impl Format for core::fmt::Error
2 parents 90f09e0 + d1ab409 commit 1c79a57

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ We have several packages which live in this repository. Changes are tracked sepa
5959
* [#956] Link `LICENSE-*` in the crate folder
6060
* [#955] Allow using the `defmt/alloc` feature on bare metal ESP32-S2
6161
* [#972] Fix logic bug in env_filter
62+
* [#1007] `defmt`: impl `Format` for `core::fmt::Error`
6263

6364
### [defmt-v1.0.1] (2025-04-01)
6465

@@ -958,6 +959,7 @@ Initial release
958959

959960
---
960961

962+
[#1007]: https://github.com/knurling-rs/defmt/pull/1007
961963
[#990]: https://github.com/knurling-rs/defmt/pull/990
962964
[#986]: https://github.com/knurling-rs/defmt/pull/986
963965
[#974]: https://github.com/knurling-rs/defmt/pull/974

defmt/src/impls/core_/fmt.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
use super::*;
2+
3+
impl Format for core::fmt::Error {
4+
fn format(&self, fmt: Formatter) {
5+
crate::write!(fmt, "fmt::Error")
6+
}
7+
}

defmt/src/impls/core_/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
mod alloc_;
99
mod array;
1010
mod cell;
11+
mod fmt;
1112
#[cfg(feature = "ip_in_core")]
1213
mod net;
1314
mod num;

0 commit comments

Comments
 (0)