diff --git a/src/tasks/post_message_payload.rs b/src/tasks/post_message_payload.rs index 0ef19c71..b9127ee3 100644 --- a/src/tasks/post_message_payload.rs +++ b/src/tasks/post_message_payload.rs @@ -161,12 +161,9 @@ impl PostMessagePayload { #[cfg(test)] mod tests { - use std::{ - num::NonZeroUsize, - sync::{ - atomic::{AtomicBool, Ordering}, - Arc, - }, + use std::sync::{ + atomic::{AtomicBool, Ordering}, + Arc, }; use futures::channel::oneshot; @@ -279,7 +276,7 @@ mod tests { let engine = wasmer::Engine::default(); let module = wasmer::Module::new(&engine, wasm).unwrap(); let msg = PostMessagePayload::Notification(Notification::CacheModule { - hash: ModuleHash::sha256(wasm), + hash: ModuleHash::hash(wasm), module: module.into(), }); @@ -288,7 +285,7 @@ mod tests { match round_tripped { PostMessagePayload::Notification(Notification::CacheModule { hash, module: _ }) => { - assert_eq!(hash, ModuleHash::sha256(wasm)); + assert_eq!(hash, ModuleHash::hash(wasm)); } _ => unreachable!(), };