Skip to content

Commit

Permalink
Fix a couple of warnings when building for wasm
Browse files Browse the repository at this point in the history
  • Loading branch information
bjorn3 committed Oct 14, 2024
1 parent 0ae564c commit f33e26f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test-libz-rs-sys/examples/compress.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ use std::{collections::hash_map::DefaultHasher, env::temp_dir, hash::Hash};
// we use the libz_sys but configure zlib-ng in zlib compat mode
use libz_sys as libz_ng_sys;

use zlib_rs::{deflate::DeflateConfig, DeflateFlush, ReturnCode};
#[cfg(not(target_family = "wasm"))]
use zlib_rs::deflate::DeflateConfig;
use zlib_rs::{DeflateFlush, ReturnCode};

use std::ffi::{c_int, c_uint};

Expand Down
1 change: 1 addition & 0 deletions zlib-rs/src/allocate.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#[cfg(unix)]
use core::ffi::c_int;
use core::{
alloc::Layout,
Expand Down

0 comments on commit f33e26f

Please sign in to comment.