From 12e7b65883a22030039806c41e704c27731e8dd9 Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Sat, 2 May 2026 22:57:18 +0800 Subject: Add Display derive and testing utilities for Next enum --- mingling_core/src/any.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'mingling_core/src/any.rs') diff --git a/mingling_core/src/any.rs b/mingling_core/src/any.rs index d1ab3d3..21611a7 100644 --- a/mingling_core/src/any.rs +++ b/mingling_core/src/any.rs @@ -117,11 +117,21 @@ pub enum ChainProcess { /// /// - `Chain`: Continue execution to the next chain /// - `Renderer`: Send output to renderer and end execution +#[derive(Debug, PartialEq, Eq)] pub enum Next { Chain, Renderer, } +impl std::fmt::Display for Next { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Next::Chain => write!(f, "Chain"), + Next::Renderer => write!(f, "Renderer"), + } + } +} + impl From> for ChainProcess { fn from(value: AnyOutput) -> Self { ChainProcess::Ok((value, Next::Chain)) -- cgit