diff --git a/Cargo.toml b/Cargo.toml index 1a10e55..ff758fe 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,4 +19,4 @@ coerce = [] nightly = ["coerce"] [dev-dependencies] -pollster = { version = "0.4.0", features = ["macro"] } +futures = { version = "0.3", default-features = false, features = ["executor"] } diff --git a/src/smallbox.rs b/src/smallbox.rs index 9522f7a..74e34fe 100644 --- a/src/smallbox.rs +++ b/src/smallbox.rs @@ -688,10 +688,11 @@ mod tests { assert_eq!(cellbox.get(), 1); } - #[pollster::test] - async fn test_future() { + #[test] + fn test_future() { let boxed_fut: SmallBox<_, S1> = SmallBox::new(async { 123 }); - assert_eq!(boxed_fut.await, 123); + + assert_eq!(futures::executor::block_on(boxed_fut), 123); } #[test]