From e6e615a6de018a92d4e618a0124561fafbb43144 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sosth=C3=A8ne=20Gu=C3=A9don?= Date: Wed, 27 Aug 2025 11:56:28 +0200 Subject: [PATCH] Implement default for capacity error Fix https://github.com/rust-embedded/heapless/issues/601 --- CHANGELOG.md | 2 ++ src/lib.rs | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index defc0766..2a321eb4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - Minor fixes to module docs. - Make MSRV of 1.87.0 explicit. +- Implement `Default` for `CapacityError` + ## [v0.9.1] - 2025-08-19 ### Added diff --git a/src/lib.rs b/src/lib.rs index 08e0ab4a..656999ee 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -228,7 +228,7 @@ pub mod _export { } /// The error type for fallible [`Vec`] and [`String`] methods. -#[derive(Debug)] +#[derive(Debug, Default)] #[non_exhaustive] pub struct CapacityError;