From 2aa7bda3cb21ce6c052b82e08bcab79a625d04f2 Mon Sep 17 00:00:00 2001 From: Weicao-CatilGrass <1992414357@qq.com> Date: Sun, 31 May 2026 02:42:52 +0800 Subject: Enhance code quality across the entire codebase --- mingling_core/src/program/error.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'mingling_core/src/program/error.rs') diff --git a/mingling_core/src/program/error.rs b/mingling_core/src/program/error.rs index 03e9af6..822e429 100644 --- a/mingling_core/src/program/error.rs +++ b/mingling_core/src/program/error.rs @@ -9,9 +9,9 @@ pub struct ProgramPanic { impl fmt::Display for ProgramPanic { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { if let Some(s) = self.payload.downcast_ref::<&str>() { - write!(f, "{}", s) + write!(f, "{s}") } else if let Some(s) = self.payload.downcast_ref::() { - write!(f, "{}", s) + write!(f, "{s}") } else { write!(f, "") } @@ -19,6 +19,7 @@ impl fmt::Display for ProgramPanic { } impl ProgramPanic { + #[must_use] pub fn new(payload: Box) -> Self { ProgramPanic { payload } } -- cgit