From 19d19e2d81153d8171f8fbfbfd317771d9fafe09 Mon Sep 17 00:00:00 2001 From: G2-Games Date: Sat, 6 Jul 2024 01:37:01 -0500 Subject: [PATCH] Fixed compilation without `web-unstable-apis` on native --- Cargo.toml | 2 +- src/lib.rs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index bacf2e9..8da972d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -58,4 +58,4 @@ codegen-units = 1 dwarf-debug-info = true [package.metadata.docs.rs] -targets = ["x86_64-unknown-linux-gnu", "x86_64-pc-windows-msvc", "x86_64-apple-darwin", "aarch64-apple-darwin", "wasm32-unknown-unknown"] +targets = ["x86_64-unknown-linux-gnu", "x86_64-pc-windows-msvc", "x86_64-apple-darwin", "aarch64-apple-darwin"] diff --git a/src/lib.rs b/src/lib.rs index cb8847a..05e9b22 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -165,6 +165,7 @@ macro_rules! device_filter { } } +#[cfg(target_family = "wasm")] #[cfg(not(web_sys_unstable_apis))] compile_error!{ "Cannot compile `web-sys` (a dependency of this crate) with USB support without `web_sys_unstable_apis`!