From 50192cbe91da765d3c09cf8e12f328b721d3cb46 Mon Sep 17 00:00:00 2001 From: superwhiskers Date: Sun, 14 Sep 2025 08:06:27 -0500 Subject: add a `Display` implementation to `Expression` this change adds a string formatter for `Expression`s using the `Display` trait. additionally, it standardizes the way `Display` implementations are written and makes some minor adjustments to the parameters used for the proptest-based test for `Expression`. Change-Id: I6a6a6964cd5c04e95341a499dcd73297ca2f514a --- crates/core/src/hive/mod.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'crates/core/src/hive') diff --git a/crates/core/src/hive/mod.rs b/crates/core/src/hive/mod.rs index ad14725..3f83099 100644 --- a/crates/core/src/hive/mod.rs +++ b/crates/core/src/hive/mod.rs @@ -297,8 +297,8 @@ pub enum Error { #[cfg(feature = "core-fmt")] impl fmt::Display for Error { - fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> Result<(), fmt::Error> { - fmt.write_str("memory allocation failed")?; + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + f.write_str("memory allocation failed")?; let reason = match self { Error::CapacityOverflow => { " because the computed capacity exceeded the hive's maximum" @@ -307,7 +307,7 @@ impl fmt::Display for Error { " because the memory allocator returned an error" } }; - fmt.write_str(reason) + f.write_str(reason) } } -- cgit 1.4.1-2-gfad0