Skip to content

Commit 81493ec

Browse files
authored
Merge branch 'master' into defmt-escaped-str
2 parents 6b2f594 + 9809a85 commit 81493ec

File tree

6 files changed

+24
-12
lines changed

6 files changed

+24
-12
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222

2323
include:
2424
# Test MSRV
25-
- rust: 1.65.0 # keep in sync with manifest rust-version
25+
- rust: 1.87.0 # keep in sync with manifest rust-version
2626
TARGET: x86_64-unknown-linux-gnu
2727

2828
# Test nightly but don't fail

CHANGELOG.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,18 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
77

88
## [Unreleased]
99

10-
### Added
1110

11+
### Breaking
12+
- MSRV is now `1.87.0`.
13+
14+
### Added
1215
- Implement `defmt::Format` for `EscapedStr`, `EscapedStringFragment` and `StringUnescapeError`.
1316
- Implement `Default` for `EscapedStr` (returning an empty string).
1417

18+
### Changed
19+
- Updated `heapless` to version 0.9.2.
20+
- Updated `defmt` to version 1.0.1.
21+
1522
## [v0.6.0] - 2024-08-07
1623

1724
### Breaking

Cargo.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ authors = ["Jorge Aparicio <[email protected]>",
44
"Robert Jördens <[email protected]>",
55
"Mathias Koch <[email protected]>"
66
]
7-
categories = ["no-std"]
7+
categories = ["parsing", "no-std", "no-std::no-alloc", "embedded", "web-programming"]
88
description = "serde-json for no_std programs"
99
documentation = "https://docs.rs/serde-json-core"
1010
edition = "2018"
11-
rust-version = "1.65.0" # keep in sync with ci, src/lib.rs, and README
11+
rust-version = "1.87.0" # keep in sync with ci, src/lib.rs, and README
1212
keywords = ["serde", "json"]
1313
license = "MIT OR Apache-2.0"
1414
name = "serde-json-core"
@@ -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.2"
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"]

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ This project is developed and maintained by the [rust-embedded-community].
1212

1313
## Minimum Supported Rust Version (MSRV)
1414

15-
This crate is guaranteed to compile on stable Rust 1.65.0 and up. It *might*
15+
This crate is guaranteed to compile on stable Rust 1.87.0 and up. It *might*
1616
compile with older versions but that may change in any new patch release.
1717

1818
## License

src/lib.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,13 @@
4747
//! - `bool`
4848
//! - Integers
4949
//! - Floats
50-
//! - `str` (\*\*)
50+
//! - `str`
5151
//! - `Option`
5252
//! - Arrays
5353
//! - Tuples
5454
//! - Structs
5555
//! - C like enums
5656
//!
57-
//! (\*\*) Serialization of strings doesn't escape stuff. This simply has not been implemented yet.
58-
//!
5957
//! # Planned features
6058
//!
6159
//! - (De)serialization from / into IO objects once `core::io::{Read,Write}` becomes a thing.
@@ -70,7 +68,7 @@
7068
//!
7169
//! # Minimum Supported Rust Version (MSRV)
7270
//!
73-
//! This crate is guaranteed to compile on stable Rust 1.65.0 and up. It *might* compile with older
71+
//! This crate is guaranteed to compile on stable Rust 1.70.0 and up. It *might* compile with older
7472
//! versions but that may change in any new patch release.
7573
7674
#![deny(missing_docs)]

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)