Skip to content

Commit 845ec0c

Browse files
committed
bump heapless to 0.9.1 and defmt to 1.0.1
1 parent 645bbfd commit 845ec0c

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ version = "0.6.0"
2020
ryu = "1.0.5"
2121

2222
[dependencies.heapless]
23-
version = "0.8"
23+
version = "0.9.1"
2424
features = ["serde"]
2525
optional = true
2626

@@ -30,7 +30,7 @@ features = ["derive"]
3030
version = "1.0.100"
3131

3232
[dependencies.defmt]
33-
version = "0.3"
33+
version = "1.0.1"
3434
optional = true
3535

3636
[dev-dependencies]
@@ -40,4 +40,4 @@ serde_derive = "1.0.100"
4040
default = ["heapless"]
4141
custom-error-messages = ["heapless"]
4242
std = ["serde/std"]
43-
defmt = ["dep:defmt", "heapless?/defmt-03"]
43+
defmt = ["dep:defmt", "heapless?/defmt"]

src/ser/mod.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,13 @@ impl From<u8> for Error {
4242
}
4343
}
4444

45+
#[cfg(feature = "heapless")]
46+
impl From<heapless::CapacityError> for Error {
47+
fn from(_: heapless::CapacityError) -> Self {
48+
Error::BufferFull
49+
}
50+
}
51+
4552
impl serde::ser::StdError for Error {}
4653

4754
impl fmt::Display for Error {

0 commit comments

Comments
 (0)