diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 94069895..f0c81c64 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,7 +22,7 @@ jobs: include: # Test MSRV - - rust: 1.70.0 # keep in sync with manifest rust-version + - rust: 1.87.0 # keep in sync with manifest rust-version TARGET: x86_64-unknown-linux-gnu # Test nightly but don't fail diff --git a/CHANGELOG.md b/CHANGELOG.md index 7b4e416c..d00c3e30 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ## [Unreleased] ### Breaking -- MSRV is now `1.70.0`. +- MSRV is now `1.87.0`. ## [v0.6.0] - 2024-08-07 diff --git a/Cargo.toml b/Cargo.toml index c8cafd08..0887f79b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,7 +8,7 @@ categories = ["parsing", "no-std", "no-std::no-alloc", "embedded", "web-programm description = "serde-json for no_std programs" documentation = "https://docs.rs/serde-json-core" edition = "2018" -rust-version = "1.70.0" # keep in sync with ci, src/lib.rs, and README +rust-version = "1.87.0" # keep in sync with ci, src/lib.rs, and README keywords = ["serde", "json"] license = "MIT OR Apache-2.0" name = "serde-json-core" @@ -20,7 +20,7 @@ version = "0.6.0" ryu = "1.0.5" [dependencies.heapless] -version = "0.8" +version = "0.9.1" features = ["serde"] optional = true @@ -30,7 +30,7 @@ features = ["derive"] version = "1.0.100" [dependencies.defmt] -version = "0.3" +version = "1.0.1" optional = true [dev-dependencies] @@ -40,4 +40,4 @@ serde_derive = "1.0.100" default = ["heapless"] custom-error-messages = ["heapless"] std = ["serde/std"] -defmt = ["dep:defmt", "heapless?/defmt-03"] +defmt = ["dep:defmt", "heapless?/defmt"] diff --git a/README.md b/README.md index b1640796..55c01453 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ This project is developed and maintained by the [rust-embedded-community]. ## Minimum Supported Rust Version (MSRV) -This crate is guaranteed to compile on stable Rust 1.70.0 and up. It *might* +This crate is guaranteed to compile on stable Rust 1.87.0 and up. It *might* compile with older versions but that may change in any new patch release. ## License diff --git a/src/ser/mod.rs b/src/ser/mod.rs index 273072f2..b45c5695 100644 --- a/src/ser/mod.rs +++ b/src/ser/mod.rs @@ -42,6 +42,13 @@ impl From for Error { } } +#[cfg(feature = "heapless")] +impl From for Error { + fn from(_: heapless::CapacityError) -> Self { + Error::BufferFull + } +} + impl serde::ser::StdError for Error {} impl fmt::Display for Error {