diff --git a/crates/font-manager/src/store.rs b/crates/font-manager/src/store.rs index 990e02548..ca76c2da0 100644 --- a/crates/font-manager/src/store.rs +++ b/crates/font-manager/src/store.rs @@ -6,10 +6,12 @@ use std::collections::HashMap; use std::path::{Path, PathBuf}; +#[cfg(not(target_arch = "wasm32"))] use std::sync::Arc; use std::sync::atomic::{AtomicBool, Ordering}; use std::sync::{Condvar, Mutex}; +#[cfg(not(target_arch = "wasm32"))] use craft_font_catalog::Catalog; pub use craft_font_store::UserSource; #[cfg(not(target_arch = "wasm32"))] diff --git a/crates/print/src/lib.rs b/crates/print/src/lib.rs index 02f26c655..3308cafa4 100644 --- a/crates/print/src/lib.rs +++ b/crates/print/src/lib.rs @@ -865,7 +865,9 @@ pub struct Cancel(std::sync::Arc); const PENDING: u8 = 0; const CANCELLED: u8 = 1; +#[cfg(any(test, windows, all(unix, not(target_arch = "wasm32"))))] const SENDING: u8 = 2; +#[cfg(any(test, windows, all(unix, not(target_arch = "wasm32"))))] const CANCELLED_MESSAGE: &str = "the print job was cancelled before anything was sent to the printer"; impl Cancel { @@ -887,6 +889,7 @@ impl Cancel { /// The last point before anything reaches the spooler: the job is being sent from here on, /// unless it was cancelled. + #[cfg(any(test, windows, all(unix, not(target_arch = "wasm32"))))] pub(crate) fn start_sending(&self) -> Result<(), Error> { use std::sync::atomic::Ordering::{AcqRel, Acquire}; match self.0.compare_exchange(PENDING, SENDING, AcqRel, Acquire) {