From 80f1dbde0b63dd61b2567d5b62b39abd4dd3cec1 Mon Sep 17 00:00:00 2001 From: Zachery Aaron Shores-Chmielewski Date: Sun, 8 Feb 2026 00:20:03 +0700 Subject: [PATCH] refactor: clean modules, remove dead files Flatten the worker module, relocate its tests into a crate-level test module, and delete stale generated artifacts. - src/worker.rs: flatten the `worker/mod.rs` directory into a single `worker.rs` module file - src/lib.rs: wire in a new `crate_test` module for crate-level tests - src/crate_test/mod.rs: move the worker's `tests.rs` into a crate-level `crate_test` module, updating the `Worker` import to `crate::worker` - deps.dot, deps.html: remove checked-in dependency-graph artifacts - spectral_report.txt: remove the stale static-analysis report Signed-off-by: Zachery Aaron Shores-Chmielewski --- deps.dot | 215 ------------ deps.html | 380 --------------------- spectral_report.txt | 125 ------- src/{worker/tests.rs => crate_test/mod.rs} | 2 + src/lib.rs | 4 + src/{worker/mod.rs => worker.rs} | 2 - 6 files changed, 6 insertions(+), 722 deletions(-) delete mode 100644 deps.dot delete mode 100644 deps.html delete mode 100644 spectral_report.txt rename src/{worker/tests.rs => crate_test/mod.rs} (99%) rename src/{worker/mod.rs => worker.rs} (99%) diff --git a/deps.dot b/deps.dot deleted file mode 100644 index 6b8b355..0000000 --- a/deps.dot +++ /dev/null @@ -1,215 +0,0 @@ -digraph swactor { - rankdir=LR; - fontname="Helvetica"; - fontsize=14; - node [fontname="Helvetica", fontsize=11, style=filled, shape=record]; - edge [fontname="Helvetica", fontsize=9]; - label="swactor — internal dependency DAG"; - labelloc=t; - compound=true; - newrank=true; - splines=ortho; - - subgraph cluster_error { - label="error"; - style="rounded,filled"; fillcolor="#f0f0f0"; color="#888"; - Error [label="{Error|0: Box\}", fillcolor="#e8f5e9"]; - } - subgraph cluster_config { - label="config"; - style="rounded,filled"; fillcolor="#f0f0f0"; color="#888"; - BackoffPolicy [label="{BackoffPolicy|spin_threshold: u32\nyield_threshold: u32\nsleep_increment_us: u64\nsleep_max_us: u64}", fillcolor="#e8f5e9"]; - RuntimeConfig [label="{RuntimeConfig|max_actors: usize\nactor_max_messages: usize\nnum_threads: usize\nmailbox_waterlevel: usize\nbackoff_policy: BackoffPolicy}", fillcolor="#e8f5e9"]; - } - subgraph cluster_channel { - label="channel"; - style="rounded,filled"; fillcolor="#f0f0f0"; color="#888"; - HybridChannel [label="{HybridChannel|ring: ArrayQueue\\noverflow: SegQueue\}", fillcolor="#fff9c4"]; - Receiver [label="{Receiver|queue: Arc\\>}", fillcolor="#fff9c4"]; - Sender [label="{Sender|queue: Arc\\>}", fillcolor="#fff9c4"]; - } - subgraph cluster_actor { - label="actor"; - style="rounded,filled"; fillcolor="#e3f2fd"; color="#1565c0"; - Message [label="{«trait» Message}", fillcolor="#bbdefb"]; - ActorInterface [label="{«trait» ActorInterface|Incoming(Message)\nResponse(Message)\nhandle((&self, &Ctx, Self::Incoming))}", fillcolor="#bbdefb"]; - ActorAddress [label="{ActorAddress|0: [u8; ..]}", fillcolor="#bbdefb"]; - Actor [label="{Actor|addr: ActorAddress\nmailbox: Mailbox\\ninner: A}", fillcolor="#bbdefb"]; - AnyActor [label="{«trait» AnyActor|tick((&self, &dyn ContextInner) → bool)\ndeliver((&self, Box\) → bool)}", fillcolor="#bbdefb"]; - } - subgraph cluster_address_map { - label="address_map"; - style="rounded,filled"; fillcolor="#f3e5f5"; color="#7b1fa2"; - WorkerId [label="{WorkerId|0: usize}", fillcolor="#e1bee7"]; - AddressMap [label="{AddressMap|inner: RwLock\\>}", fillcolor="#e1bee7"]; - Placement [label="{Placement|next: AtomicUsize\nnum_workers: usize}", fillcolor="#e1bee7"]; - } - subgraph cluster_runtime { - label="runtime"; - style="rounded,filled"; fillcolor="#fce4ec"; color="#c62828"; - Inbox [label="{Inbox|addr: ActorAddress\ninner: Receiver\}", fillcolor="#ffcdd2"]; - RuntimeHandle [label="{RuntimeHandle|runtime: Arc\\nthreads: Vec\\>}", fillcolor="#ffcdd2"]; - Ctx [label="{Ctx|inner: &'a dyn ContextInner\nself_addr: ActorAddress}", fillcolor="#ffcdd2"]; - SenderT [label="{«trait» SenderT|try_send_any((&self, Box\))}", fillcolor="#ffcdd2"]; - Runtime [label="{Runtime|config: RuntimeConfig\naddress_map: Arc\\ninbox_registry: Arc\\ntransfer_txs: Vec\\>\nspawn_txs: Vec\)\>\>\nplacement: Placement\nis_running: AtomicBool\nsingle_worker: Option\\>\npending_workers: Option\\>}", fillcolor="#ffcdd2"]; - Envelope [label="{Envelope|dest: ActorAddress\npayload: Box\}", fillcolor="#ffcdd2"]; - InboxRegistry [label="{InboxRegistry|senders: RwLock\\>\>}", fillcolor="#ffcdd2"]; - ContextInner [label="{«trait» ContextInner|send_any((&self, ActorAddress, Box\) → Result\<(), Error\>)\nspawn_any((&self, ActorAddress, Box\) → Result\<(), Error\>)\nmailbox_waterlevel((&self) → usize)}", fillcolor="#ffcdd2"]; - } - subgraph cluster_worker { - label="worker"; - style="rounded,filled"; fillcolor="#fff3e0"; color="#e65100"; - TickContext [label="{TickContext|address_map: &'a AddressMap\ntransfer_txs: &'a [Sender\]\nspawn_txs: &'a [Sender\<(ActorAddress, Box\)\>]\nplacement: &'a Placement\ninbox_registry: &'a InboxRegistry\nconfig: &'a RuntimeConfig}", fillcolor="#ffe0b2"]; - Worker [label="{Worker|id: WorkerId\npool: ActorPool\ntransfer_rx: Receiver\\nspawn_rx: Receiver\<(ActorAddress, Box\)\>}", fillcolor="#ffe0b2"]; - WorkerContext [label="{WorkerContext|worker_id: WorkerId\naddress_map: &'a AddressMap\ntransfer_txs: &'a [Sender\]\nspawn_txs: &'a [Sender\<(ActorAddress, Box\)\>]\nplacement: &'a Placement\ninbox_registry: &'a InboxRegistry\nconfig: &'a RuntimeConfig\npending_local: &'a RefCell\)\>\>}", fillcolor="#ffe0b2"]; - ActorPool [label="{ActorPool|actors: HashMap\\>}", fillcolor="#ffe0b2"]; - Mailbox [label="{Mailbox|queue: VecDeque\\nwaterlevel: usize}", fillcolor="#ffe0b2"]; - } - subgraph cluster_python { - label="python (feature-gated)"; - style="rounded,dashed,filled"; fillcolor="#f5f5f5"; color="#999"; - PyMsg [label="{PyMsg|0: PyObject}", fillcolor="#d7ccc8"]; - PyActorAddress [label="{PyActorAddress|inner: ActorAddress}", fillcolor="#d7ccc8"]; - Effect [label="{«enum» Effect|Send \{ addr: ActorAddress, msg: PyObject \}\nSpawn \{ addr: ActorAddress, handler: PyObject \}}", fillcolor="#d7ccc8"]; - PyCtx [label="{PyCtx|self_addr: ActorAddress\neffects: RefCell\\>}", fillcolor="#d7ccc8"]; - PyActor [label="{PyActor|handler: PyObject}", fillcolor="#d7ccc8"]; - PyInbox [label="{PyInbox|inner: Inbox\}", fillcolor="#d7ccc8"]; - PyRuntimeConfig [label="{PyRuntimeConfig|num_threads: usize\nmax_actors: usize\nactor_max_messages: usize\nmailbox_waterlevel: usize\nspin_threshold: u32\nyield_threshold: u32\nsleep_increment_us: u64\nsleep_max_us: u64}", fillcolor="#d7ccc8"]; - PyRuntime [label="{PyRuntime|inner: Option\}", fillcolor="#d7ccc8"]; - PyRuntimeHandle [label="{PyRuntimeHandle|inner: Option\}", fillcolor="#d7ccc8"]; - } - - // ═══════════════════════════════════════════════════════════════════ - // INTRA-MODULE EDGES (within same cluster) - // ═══════════════════════════════════════════════════════════════════ - - ActorInterface -> Message [label="Incoming", style=dashed, color="#666", penwidth=1]; - Actor -> ActorAddress [label="addr", style=dashed, color="#666", penwidth=1]; - Actor -> AnyActor [label="impl", style=dotted, color="#666", penwidth=1]; - Worker -> ActorPool [label="pool", style=dashed, color="#666", penwidth=1]; - Worker -> TickContext [label="tick_once() param", style=dashed, color="#666", penwidth=1]; - Receiver -> HybridChannel [label="queue", style=dashed, color="#666", penwidth=1]; - Sender -> HybridChannel [label="queue", style=dashed, color="#666", penwidth=1]; - Receiver -> Sender [label="new_sender() param", style=dashed, color="#666", penwidth=1]; - AddressMap -> WorkerId [label="inner", style=dashed, color="#666", penwidth=1]; - Placement -> WorkerId [label="next_worker() param", style=dashed, color="#666", penwidth=1]; - RuntimeConfig -> BackoffPolicy [label="backoff_policy", style=dashed, color="#666", penwidth=1]; - RuntimeHandle -> Runtime [label="runtime", style=dashed, color="#666", penwidth=1]; - Ctx -> ContextInner [label="inner", style=dashed, color="#666", penwidth=1]; - Runtime -> InboxRegistry [label="inbox_registry", style=dashed, color="#666", penwidth=1]; - Runtime -> Envelope [label="transfer_txs", style=dashed, color="#666", penwidth=1]; - InboxRegistry -> SenderT [label="senders", style=dashed, color="#666", penwidth=1]; - Runtime -> Inbox [label="new_inbox() param", style=dashed, color="#666", penwidth=1]; - Runtime -> RuntimeHandle [label="run() param", style=dashed, color="#666", penwidth=1]; - Runtime -> ContextInner [label="impl", style=dotted, color="#666", penwidth=1]; - PyCtx -> Effect [label="effects", style=dashed, color="#666", penwidth=1]; - PyInbox -> PyMsg [label="inner", style=dashed, color="#666", penwidth=1]; - PyCtx -> PyActorAddress [label="self_addr() param", style=dashed, color="#666", penwidth=1]; - PyInbox -> PyActorAddress [label="addr() param", style=dashed, color="#666", penwidth=1]; - PyRuntime -> PyRuntimeConfig [label="new() param", style=dashed, color="#666", penwidth=1]; - PyRuntime -> PyActorAddress [label="spawn() param", style=dashed, color="#666", penwidth=1]; - PyRuntime -> PyInbox [label="inbox() param", style=dashed, color="#666", penwidth=1]; - PyRuntime -> PyRuntimeHandle [label="run() param", style=dashed, color="#666", penwidth=1]; - PyRuntimeHandle -> PyActorAddress [label="spawn() param", style=dashed, color="#666", penwidth=1]; - PyRuntimeHandle -> PyInbox [label="inbox() param", style=dashed, color="#666", penwidth=1]; - - // ═══════════════════════════════════════════════════════════════════ - // CROSS-MODULE EDGES (the real dependency DAG) - // ═══════════════════════════════════════════════════════════════════ - - // --- channel depends on runtime --- - Sender -> SenderT [label="impl", style=dotted, color="#666", penwidth=1.5]; - - // --- actor depends on runtime --- - ActorInterface -> Ctx [label="handle", style=solid, color="#1565c0", penwidth=1.5]; - AnyActor -> ContextInner [label="tick", style=solid, color="#1565c0", penwidth=1.5]; - Actor -> ContextInner [label="tick() param", style=solid, color="#1565c0", penwidth=1.5]; - - // --- actor depends on worker --- - Actor -> Mailbox [label="mailbox", style=solid, color="#1565c0", penwidth=1.5]; - - // --- address_map depends on actor --- - AddressMap -> ActorAddress [label="inner", style=solid, color="#7b1fa2", penwidth=1.5]; - - // --- runtime depends on error --- - ContextInner -> Error [label="send_any", style=solid, color="#c62828", penwidth=1.5]; - Ctx -> Error [label="send() param", style=solid, color="#c62828", penwidth=1.5]; - Runtime -> Error [label="spawn() param", style=solid, color="#c62828", penwidth=1.5]; - InboxRegistry -> Error [label="try_deliver() param", style=solid, color="#c62828", penwidth=1.5]; - - // --- runtime depends on config --- - Runtime -> RuntimeConfig [label="config", style=solid, color="#c62828", penwidth=1.5]; - - // --- runtime depends on channel --- - Inbox -> Receiver [label="inner", style=solid, color="#c62828", penwidth=1.5]; - Runtime -> Sender [label="transfer_txs", style=solid, color="#c62828", penwidth=1.5]; - - // --- runtime depends on actor --- - Inbox -> ActorAddress [label="addr", style=solid, color="#c62828", penwidth=1.5]; - Ctx -> ActorAddress [label="self_addr", style=solid, color="#c62828", penwidth=1.5]; - Runtime -> ActorAddress [label="spawn_txs", style=solid, color="#c62828", penwidth=1.5]; - Runtime -> AnyActor [label="spawn_txs", style=solid, color="#c62828", penwidth=1.5]; - Envelope -> ActorAddress [label="dest", style=solid, color="#c62828", penwidth=1.5]; - InboxRegistry -> ActorAddress [label="senders", style=solid, color="#c62828", penwidth=1.5]; - ContextInner -> ActorAddress [label="send_any", style=solid, color="#c62828", penwidth=1.5]; - ContextInner -> AnyActor [label="spawn_any", style=solid, color="#c62828", penwidth=1.5]; - - // --- runtime depends on address_map --- - Runtime -> AddressMap [label="address_map", style=solid, color="#c62828", penwidth=1.5]; - Runtime -> Placement [label="placement", style=solid, color="#c62828", penwidth=1.5]; - - // --- runtime depends on worker --- - Runtime -> Worker [label="single_worker", style=solid, color="#c62828", penwidth=1.5]; - - // --- worker depends on error --- - WorkerContext -> Error [label="send_any() param", style=solid, color="#e65100", penwidth=1.5]; - - // --- worker depends on config --- - TickContext -> RuntimeConfig [label="config", style=solid, color="#e65100", penwidth=1.5]; - WorkerContext -> RuntimeConfig [label="config", style=solid, color="#e65100", penwidth=1.5]; - Worker -> BackoffPolicy [label="run() param", style=solid, color="#e65100", penwidth=1.5]; - - // --- worker depends on channel --- - TickContext -> Sender [label="transfer_txs", style=solid, color="#e65100", penwidth=1.5]; - Worker -> Receiver [label="transfer_rx", style=solid, color="#e65100", penwidth=1.5]; - WorkerContext -> Sender [label="transfer_txs", style=solid, color="#e65100", penwidth=1.5]; - - // --- worker depends on actor --- - TickContext -> ActorAddress [label="spawn_txs", style=solid, color="#e65100", penwidth=1.5]; - TickContext -> AnyActor [label="spawn_txs", style=solid, color="#e65100", penwidth=1.5]; - Worker -> ActorAddress [label="spawn_rx", style=solid, color="#e65100", penwidth=1.5]; - Worker -> AnyActor [label="spawn_rx", style=solid, color="#e65100", penwidth=1.5]; - WorkerContext -> ActorAddress [label="spawn_txs", style=solid, color="#e65100", penwidth=1.5]; - WorkerContext -> AnyActor [label="spawn_txs", style=solid, color="#e65100", penwidth=1.5]; - ActorPool -> ActorAddress [label="actors", style=solid, color="#e65100", penwidth=1.5]; - ActorPool -> AnyActor [label="actors", style=solid, color="#e65100", penwidth=1.5]; - - // --- worker depends on address_map --- - TickContext -> AddressMap [label="address_map", style=solid, color="#e65100", penwidth=1.5]; - TickContext -> Placement [label="placement", style=solid, color="#e65100", penwidth=1.5]; - Worker -> WorkerId [label="id", style=solid, color="#e65100", penwidth=1.5]; - WorkerContext -> WorkerId [label="worker_id", style=solid, color="#e65100", penwidth=1.5]; - WorkerContext -> AddressMap [label="address_map", style=solid, color="#e65100", penwidth=1.5]; - WorkerContext -> Placement [label="placement", style=solid, color="#e65100", penwidth=1.5]; - - // --- worker depends on runtime --- - TickContext -> Envelope [label="transfer_txs", style=solid, color="#e65100", penwidth=1.5]; - TickContext -> InboxRegistry [label="inbox_registry", style=solid, color="#e65100", penwidth=1.5]; - Worker -> Envelope [label="transfer_rx", style=solid, color="#e65100", penwidth=1.5]; - WorkerContext -> Envelope [label="transfer_txs", style=solid, color="#e65100", penwidth=1.5]; - WorkerContext -> InboxRegistry [label="inbox_registry", style=solid, color="#e65100", penwidth=1.5]; - WorkerContext -> ContextInner [label="impl", style=dotted, color="#e65100", penwidth=1.5]; - ActorPool -> ContextInner [label="tick_all() param", style=solid, color="#e65100", penwidth=1.5]; - - // --- python depends on actor --- - PyActorAddress -> ActorAddress [label="inner", style=solid, color="#999", penwidth=1.5]; - Effect -> ActorAddress [label="Send", style=solid, color="#999", penwidth=1.5]; - PyCtx -> ActorAddress [label="self_addr", style=solid, color="#999", penwidth=1.5]; - PyActor -> ActorInterface [label="impl", style=dotted, color="#999", penwidth=1.5]; - - // --- python depends on runtime --- - PyInbox -> Inbox [label="inner", style=solid, color="#999", penwidth=1.5]; - PyRuntime -> Runtime [label="inner", style=solid, color="#999", penwidth=1.5]; - PyRuntimeHandle -> RuntimeHandle [label="inner", style=solid, color="#999", penwidth=1.5]; - PyActor -> Ctx [label="handle() param", style=solid, color="#999", penwidth=1.5]; -} diff --git a/deps.html b/deps.html deleted file mode 100644 index 9268f46..0000000 --- a/deps.html +++ /dev/null @@ -1,380 +0,0 @@ - - - -swactor dependency DAG - - -
- swactor dep graph   - - - - scroll to zoom · drag to pan · click node to focus -
-
-
Loading Graphviz…
- - diff --git a/spectral_report.txt b/spectral_report.txt deleted file mode 100644 index a76d543..0000000 --- a/spectral_report.txt +++ /dev/null @@ -1,125 +0,0 @@ -======================================================================== - SPECTRAL ANALYSIS REPORT — Dependency DAG -======================================================================== - -GRAPH SUMMARY ----------------------------------------- - Nodes: 36 - Directed edges: 78 - Modules: 8 - Connected components: 2 - Modules: error, config, channel, actor, address_map, runtime, worker, python - -LAPLACIAN EIGENVALUE SPECTRUM ----------------------------------------- - lambda_ 0 = 0.0000 - lambda_ 1 = 0.0000 <-- Fiedler value (lambda_2) - lambda_ 2 = 0.1864 - lambda_ 3 = 0.4814 - lambda_ 4 = 0.6124 - lambda_ 5 = 0.7986 - lambda_ 6 = 0.8319 - lambda_ 7 = 1.0046 - lambda_ 8 = 1.2394 - lambda_ 9 = 1.3690 - lambda_10 = 1.4527 - lambda_11 = 1.6261 - lambda_12 = 2.3213 - lambda_13 = 2.3936 - lambda_14 = 2.9092 - lambda_15 = 3.1570 - lambda_16 = 3.2200 - lambda_17 = 3.3902 - lambda_18 = 3.4799 - lambda_19 = 3.6052 - lambda_20 = 3.8848 - lambda_21 = 4.1863 - lambda_22 = 4.7070 - lambda_23 = 5.1732 - lambda_24 = 5.5865 - lambda_25 = 5.7959 - lambda_26 = 5.8550 - lambda_27 = 6.1829 - lambda_28 = 6.4619 - lambda_29 = 6.8986 - lambda_30 = 7.3807 - lambda_31 = 7.8965 - lambda_32 = 9.1602 - lambda_33 = 11.1710 - lambda_34 = 14.0475 - lambda_35 = 15.5333 - - Spectral gap (lambda_max - lambda_2): 15.5333 - Fiedler value (algebraic connectivity): 0.0000 - -FIEDLER VECTOR — SPECTRAL BISECTION ----------------------------------------- - Partition A (Fiedler < 0): - HybridChannel [channel ] f = -0.0000 - RuntimeConfig [config ] f = -0.0000 - SenderT [runtime ] f = -0.0000 - PyRuntimeHandle [python ] f = -0.0000 - PyRuntimeConfig [python ] f = -0.0000 - Placement [address_map ] f = -0.0000 - Message [actor ] f = -0.0000 - PyActorAddress [python ] f = -0.0000 - PyRuntime [python ] f = -0.0000 - Envelope [runtime ] f = -0.0000 - PyActor [python ] f = -0.0000 - TickContext [worker ] f = -0.0000 - Sender [channel ] f = -0.0000 - InboxRegistry [runtime ] f = -0.0000 - Runtime [runtime ] f = -0.0000 - Receiver [channel ] f = -0.0000 - ──────────────────────────────────── - Partition B (Fiedler >= 0): - Error [error ] f = +0.0000 - Ctx [actor ] f = +0.0000 - Effect [python ] f = +0.0000 - BackoffPolicy [config ] f = +0.0000 - ActorAddress [actor ] f = +0.0000 - AddressMap [address_map ] f = +0.0000 - ContextInner [actor ] f = +0.0000 - Worker [worker ] f = +0.0000 - ActorPool [worker ] f = +0.0000 - WorkerContext [worker ] f = +0.0000 - RuntimeHandle [runtime ] f = +0.0000 - PyInbox [python ] f = +0.0000 - ActorInterface [actor ] f = +0.0000 - AnyActor [actor ] f = +0.0000 - WorkerId [address_map ] f = +0.0000 - Inbox [runtime ] f = +0.0000 - PyCtx [python ] f = +0.0000 - PyMsg [python ] f = +0.0000 - Actor [actor ] f = +0.0000 - Mailbox [worker ] f = +1.0000 - -MODULE COUPLING MATRIX (directed edge counts) ----------------------------------------- - error config channel actoraddress_map runtime worker python - error 0 0 0 0 0 0 0 0 - config 0 1 0 0 0 0 0 0 - channel 0 0 3 0 0 1 0 0 - actor 2 0 0 7 0 0 0 0 - address_map 0 0 0 1 2 0 0 0 - runtime 2 1 2 6 2 6 1 0 - worker 1 1 2 9 4 3 3 0 - python 0 0 0 5 0 3 0 10 - - Cross-module edges: 46 / 78 (59.0%) - -CONNECTOME COMPLEXITY INDEX (CCI) ----------------------------------------- - Sub-metric Raw Normalized Weight Contrib - ──────────────────────────────────────── ────────── ────────── ──────── ──────── - Algebraic connectivity (lambda_2/n) 0.0000 0.0000 0.25 0.0000 - Spectral entropy (H/log2(k)) 4.6411 0.9123 0.25 0.2281 - Edge density (|E|/n(n-1)) 0.0619 0.0619 0.15 0.0093 - Cross-module coupling ratio 0.5897 0.5897 0.20 0.1179 - Spectral radius (rho/(n-1)) 6.6762 0.1907 0.15 0.0286 - ──────────────────────────────────────── ────────── ────────── ──────── ──────── - CCI (weighted sum) 1.00 0.3839 - - Interpretation: MODERATE complexity — typical well-structured codebase - -======================================================================== \ No newline at end of file diff --git a/src/worker/tests.rs b/src/crate_test/mod.rs similarity index 99% rename from src/worker/tests.rs rename to src/crate_test/mod.rs index b9fa56e..1eac33e 100644 --- a/src/worker/tests.rs +++ b/src/crate_test/mod.rs @@ -1,3 +1,5 @@ +//! Tests meant to be run against the crate-level API + use std::any::Any; use std::collections::HashMap; use std::sync::atomic::{AtomicBool, AtomicUsize, Ordering}; diff --git a/src/lib.rs b/src/lib.rs index 855556a..aea0a4a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -39,3 +39,7 @@ pub(crate) fn get_random(buf: &mut [u8]) { *byte = bytes[i % core::mem::size_of::()]; } } + + +#[cfg(test)] +mod crate_test; \ No newline at end of file diff --git a/src/worker/mod.rs b/src/worker.rs similarity index 99% rename from src/worker/mod.rs rename to src/worker.rs index e45acee..9090f8e 100644 --- a/src/worker/mod.rs +++ b/src/worker.rs @@ -237,5 +237,3 @@ impl ActorPool { -#[cfg(test)] -mod tests;