From ad10e3437dea8279c044e921d32096c2d0054b45 Mon Sep 17 00:00:00 2001 From: Roman Shanin Date: Fri, 1 Nov 2024 14:14:43 +0300 Subject: [PATCH] chore: derive ActorStatusReport constructor --- elfo-core/src/messages.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/elfo-core/src/messages.rs b/elfo-core/src/messages.rs index 1a135937..be327734 100644 --- a/elfo-core/src/messages.rs +++ b/elfo-core/src/messages.rs @@ -113,3 +113,13 @@ pub struct ActorStatusReport { pub meta: Arc, pub status: ActorStatus, } + +impl ActorStatusReport { + #[cfg(feature = "test-util")] + pub fn new(meta: impl Into>, status: ActorStatus) -> Self { + Self { + meta: meta.into(), + status, + } + } +}