From 4db84b3cac1132176f63c719ec2af8cd0cb05f55 Mon Sep 17 00:00:00 2001 From: Eguo Wang Date: Tue, 7 May 2024 21:56:48 +0800 Subject: [PATCH] chore: allow TestState without constructor --- workflow/src/state.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/workflow/src/state.rs b/workflow/src/state.rs index 588c479..9ff4d49 100644 --- a/workflow/src/state.rs +++ b/workflow/src/state.rs @@ -24,6 +24,7 @@ pub trait State: Send + Sync { } #[cfg(test)] + mod tests { use crate::Intent; @@ -32,10 +33,11 @@ mod tests { use async_trait::async_trait; use kube::runtime::controller::Action; + #[allow(dead_code)] + struct TestState; + #[test] fn test_impl_state_trait() { - struct TestState {} - #[async_trait] impl State<()> for TestState { async fn handle(&self, _ctx: &Context<()>) -> Option> {