Skip to content

PdfCraft: An open-source PDF reader and editor written by scratch in pure Rust

refactor(ui-egui): move open_worker_tests.rs to platform/open_worker/tests.rs

aionggcb94c8f04713
diff --git a/crates/ui-egui/src/lib.rs b/crates/ui-egui/src/lib.rs
index 6291895ec..b8f2934aa 100644
--- a/crates/ui-egui/src/lib.rs
+++ b/crates/ui-egui/src/lib.rs
@@ -52,9 +52,6 @@ pub mod i18n;
pub mod theme;
mod widgets;
-#[cfg(all(test, not(target_arch = "wasm32")))]
-mod open_worker_tests;
-
use pdfcraft_engine::{DocId, Session};
pub use canvas::{DocView, RasterMemory};
diff --git a/crates/ui-egui/src/platform/open_worker.rs b/crates/ui-egui/src/platform/open_worker.rs
index 04bd1fefe..fe564db39 100644
--- a/crates/ui-egui/src/platform/open_worker.rs
+++ b/crates/ui-egui/src/platform/open_worker.rs
@@ -206,3 +206,6 @@ pub(crate) fn prepare_gate() -> (Arc<PrepareGate>, Receiver<()>, Sender<()>, Rec
let (finished, finished_rx) = mpsc::channel();
(Arc::new(PrepareGate { started, release: Mutex::new(release), finished }), started_rx, release_tx, finished_rx)
}
+
+#[cfg(all(test, not(target_arch = "wasm32")))]
+mod tests;
diff --git a/crates/ui-egui/src/open_worker_tests.rs b/crates/ui-egui/src/platform/open_worker/tests.rs
similarity index 100%
rename from crates/ui-egui/src/open_worker_tests.rs
rename to crates/ui-egui/src/platform/open_worker/tests.rs