diff options
| author | 魏曹先生 <1992414357@qq.com> | 2026-06-27 16:46:33 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2026-06-27 16:46:33 +0800 |
| commit | 6cadc8d39adebbc263e8576c389b5ef491f10ace (patch) | |
| tree | 7265cb3c6cd2e4f18fbf1e3b08b968a194c266e9 /mingling_core/src/any.rs | |
| parent | 41a597fce54b967320767b410e217fff26d3b77b (diff) | |
feat: add From<()> for ChainProcess with empty result routing
Diffstat (limited to 'mingling_core/src/any.rs')
| -rw-r--r-- | mingling_core/src/any.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/mingling_core/src/any.rs b/mingling_core/src/any.rs index ad02b0c..b115e28 100644 --- a/mingling_core/src/any.rs +++ b/mingling_core/src/any.rs @@ -1,4 +1,4 @@ -use crate::Groupped; +use crate::{Groupped, ProgramCollect}; use crate::error::ChainProcessError; #[doc(hidden)] @@ -136,6 +136,12 @@ impl<G> From<AnyOutput<G>> for ChainProcess<G> { } } +impl<G> From<()> for ChainProcess<G> where G: ProgramCollect<Enum = G> { + fn from(_v: ()) -> Self { + G::build_empty_result().route_chain() + } +} + #[cfg(test)] mod tests { use super::*; |
