From ec035d7a9c98201dcc61baa275e83d312d2874de Mon Sep 17 00:00:00 2001 From: Danila Gornushko Date: Mon, 19 May 2025 10:15:31 +0300 Subject: [PATCH] Remove the Unused section for esp-alloc stats (#3486) * remove the Unused section for esp-alloc stats * added changes to the CHANGELOG.md --- esp-alloc/CHANGELOG.md | 2 ++ esp-alloc/src/lib.rs | 11 ----------- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/esp-alloc/CHANGELOG.md b/esp-alloc/CHANGELOG.md index 187d4362e..e4ece6b43 100644 --- a/esp-alloc/CHANGELOG.md +++ b/esp-alloc/CHANGELOG.md @@ -11,8 +11,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - `allocator_api2` to support allocator APIs on stable Rust. (#3318) - `AnyMemory`, `InternalMemory`, `ExternalMemory` allocators. (#3318) +- Removed the `Unused` section for `stats()` to make the output cleaner (#3486) ### Changed + - Bump Rust edition to 2024, bump MSRV to 1.85. (#3391) - Update `defmt` to 1.0 (#3416) diff --git a/esp-alloc/src/lib.rs b/esp-alloc/src/lib.rs index 3b91b12f7..d0eed0941 100644 --- a/esp-alloc/src/lib.rs +++ b/esp-alloc/src/lib.rs @@ -130,8 +130,6 @@ //! Total allocated: 46148 //! Memory Layout: //! Internal | ████████████░░░░░░░░░░░░░░░░░░░░░░░ | Used: 35% (Used 46148 of 131068, free: 84920) -//! Unused | ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ | -//! Unused | ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ | //! ``` //! ## Feature Flags #![doc = document_features::document_features!()] @@ -338,11 +336,6 @@ impl Display for HeapStats { if let Some(region) = region.as_ref() { region.fmt(f)?; writeln!(f)?; - } else { - // Display unused memory regions - write!(f, "Unused | ")?; - write_bar(f, 0)?; - writeln!(f, " |")?; } } Ok(()) @@ -365,10 +358,6 @@ impl defmt::Format for HeapStats { for region in self.region_stats.iter() { if let Some(region) = region.as_ref() { defmt::write!(fmt, "{}\n", region); - } else { - defmt::write!(fmt, "Unused | "); - write_bar_defmt(fmt, 0); - defmt::write!(fmt, " |\n"); } } }