From 6fc585e01e01e848ab4b5f821fc0cec628dcf12c Mon Sep 17 00:00:00 2001 From: Quaternions Date: Wed, 4 Oct 2023 02:22:45 -0700 Subject: [PATCH] make main into a test --- src/worker.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/worker.rs b/src/worker.rs index afaa3a3..e16164a 100644 --- a/src/worker.rs +++ b/src/worker.rs @@ -38,7 +38,8 @@ impl Worker { type Task = String; -fn main() { +#[test] +fn test_worker() { let (sender, receiver) = mpsc::channel::(); let receiver = Arc::new((Mutex::new(receiver), Condvar::new())); let is_active = Arc::new(AtomicBool::new(true));