From f27f5aeb09616b932ab48f0905994879dd8bafe5 Mon Sep 17 00:00:00 2001 From: Weicao-CatilGrass <1992414357@qq.com> Date: Sun, 17 May 2026 22:30:50 +0800 Subject: Rename `NextProcess` to `Next` across the codebase --- mingling_core/src/any.rs | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'mingling_core/src/any.rs') diff --git a/mingling_core/src/any.rs b/mingling_core/src/any.rs index 21611a7..b8ff7b2 100644 --- a/mingling_core/src/any.rs +++ b/mingling_core/src/any.rs @@ -66,12 +66,12 @@ impl AnyOutput { /// Route the output to the next Chain pub fn route_chain(self) -> ChainProcess { - ChainProcess::Ok((self, Next::Chain)) + ChainProcess::Ok((self, NextProcess::Chain)) } /// Route the output to the Renderer, ending execution pub fn route_renderer(self) -> ChainProcess { - ChainProcess::Ok((self, Next::Renderer)) + ChainProcess::Ok((self, NextProcess::Renderer)) } #[cfg(feature = "general_renderer")] @@ -105,11 +105,11 @@ impl std::ops::DerefMut for AnyOutput { /// Chain exec result type /// /// Stores `Ok` and `Err` types of execution results, used to notify the scheduler what to execute next -/// - Returns `Ok((`[`AnyOutput`](./struct.AnyOutput.html)`, `[`Next::Chain`](./enum.Next.html)`))` to continue execution with this type next -/// - Returns `Ok((`[`AnyOutput`](./struct.AnyOutput.html)`, `[`Next::Renderer`](./enum.Next.html)`))` to render this type next and output to the terminal +/// - Returns `Ok((`[`AnyOutput`](./struct.AnyOutput.html)`, `[`NextProcess::Chain`](./enum.NextProcess.html)`))` to continue execution with this type next +/// - Returns `Ok((`[`AnyOutput`](./struct.AnyOutput.html)`, `[`NextProcess::Renderer`](./enum.NextProcess.html)`))` to render this type next and output to the terminal /// - Returns `Err(`[`ChainProcessError`](./error/enum.ChainProcessError.html)`]` to terminate the program directly pub enum ChainProcess { - Ok((AnyOutput, Next)), + Ok((AnyOutput, NextProcess)), Err(ChainProcessError), } @@ -118,22 +118,22 @@ 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 { +pub enum NextProcess { Chain, Renderer, } -impl std::fmt::Display for Next { +impl std::fmt::Display for NextProcess { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Next::Chain => write!(f, "Chain"), - Next::Renderer => write!(f, "Renderer"), + NextProcess::Chain => write!(f, "Chain"), + NextProcess::Renderer => write!(f, "Renderer"), } } } impl From> for ChainProcess { fn from(value: AnyOutput) -> Self { - ChainProcess::Ok((value, Next::Chain)) + ChainProcess::Ok((value, NextProcess::Chain)) } } -- cgit