Repository: denoland/deno_core
Pull request #1094 (2025-03-16 10:27:48)

Reduce dependency on `futures` crate
Over time many `futures` APIs have been stabilized in `std`. This migrates most uses to the std variants.

codecov-commenter: ## [Codecov](https://app.codecov.io/gh/denoland/deno_core/pull/1094?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=denoland) Report
Attention: Patch coverage is `77.77778%` with `4 lines` in your changes missing coverage. Please review.
> Project coverage is 81.13%. Comparing base [(`0c7f83e`)](https://app.codecov.io/gh/denoland/deno_core/commit/0c7f83ea8daabe8f541fc93ae97529dc446f5f24?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=denoland) to head [(`ebe83b1`)](https://app.codecov.io/gh/denoland/deno_core/commit/ebe83b1637debd0669eecf5a826ad382c68d94b6?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=denoland).
> Report is 266 commits behind head on main.

| [Files with missing lines](https://app.codecov.io/gh/denoland/deno_core/pull/1094?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=denoland) | Patch % | Lines |
|---|---|---|
| [core/io/resource.rs](https://app.codecov.io/gh/denoland/deno_core/pull/1094?src=pr&el=tree&filepath=core%2Fio%2Fresource.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=denoland#diff-Y29yZS9pby9yZXNvdXJjZS5ycw==) | 0.00% | [4 Missing :warning: ](https://app.codecov.io/gh/denoland/deno_core/pull/1094?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=denoland) |

<details><summary>Additional details and impacted files</summary>


```diff
@@            Coverage Diff             @@
##             main    #1094      +/-   ##
==========================================
- Coverage   81.43%   81.13%   -0.31%     
==========================================
  Files          97      101       +4     
  Lines       23877    28231    +4354     
==========================================
+ Hits        19445    22905    +3460     
- Misses       4432     5326     +894     
```

</details>

[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/denoland/deno_core/pull/1094?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=denoland).   
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=denoland).

<details><summary>🚀 New features to boost your workflow: </summary>

- ❄ [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
- 📦 [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>

Patch:
diff --git a/core/async_cancel.rs b/core/async_cancel.rs
index c22ecb5..f0f6097 100644
--- a/core/async_cancel.rs
+++ b/core/async_cancel.rs
@@ -15,11 +15,11 @@ use crate::RcLike;
 use crate::Resource;
 use deno_error::JsErrorClass;
 use futures::future::FusedFuture;
-use futures::future::Future;
 use futures::future::TryFuture;
-use futures::task::Context;
-use futures::task::Poll;
 use pin_project::pin_project;
+use std::future::Future;
+use std::task::Context;
+use std::task::Poll;
 
 use self::internal as i;
 
@@ -279,19 +279,19 @@ mod internal {
   use super::Canceled;
   use super::TryCancelable;
   use crate::RcRef;
-  use futures::future::Future;
-  use futures::task::Context;
-  use futures::task::Poll;
-  use futures::task::Waker;
   use pin_project::pin_project;
   use std::any::Any;
   use std::cell::UnsafeCell;
+  use std::future::Future;
   use std::marker::PhantomPinned;
   use std::mem::replace;
   use std::pin::Pin;
   use std::ptr::NonNull;
   use std::rc::Rc;
   use std::rc::Weak;
+  use std::task::Context;
+  use std::task::Poll;
+  use std::task::Waker;
 
   impl<F: Future> Cancelable<F> {
     pub(super) fn new(future: F, cancel_handle: RcRef<CancelHandle>) -> Self {
@@ -698,16 +698,16 @@ mod tests {
   use super::*;
   use futures::future::FutureExt;
   use futures::future::TryFutureExt;
-  use futures::future::pending;
-  use futures::future::poll_fn;
-  use futures::future::ready;
   use futures::pending;
   use futures::select;
-  use futures::task::Context;
-  use futures::task::Poll;
-  use futures::task::noop_waker_ref;
   use std::convert::Infallible as Never;
+  use std::future::pending;
+  use std::future::poll_fn;
+  use std::future::ready;
   use std::io;
+  use std::task::Context;
+  use std::task::Poll;
+  use std::task::Waker;
   use tokio::net::TcpStream;
   use tokio::spawn;
   use tokio::task::yield_now;
@@ -764,7 +764,7 @@ mod tests {
       box_fused(ready_in_n("K", 5).or_cancel(cancel_never)),
     ];
 
-    let mut cx = Context::from_waker(noop_waker_ref());
+    let mut cx = Context::from_waker(Waker::noop());
 
     for i in 0..=5 {
       match i {
@@ -841,15 +841,15 @@ mod tests {
     let cancel_handle = Rc::new(CancelHandle::new());
     let f = pending::<u32>();
     let mut f = Box::pin(f.or_abort(&cancel_handle));
-    let res = f.as_mut().poll(&mut Context::from_waker(noop_waker_ref()));
+    let res = f.as_mut().poll(&mut Context::from_waker(Waker::noop()));
     assert!(res.is_pending());
     cancel_handle.cancel();
-    let res = f.as_mut().poll(&mut Context::from_waker(noop_waker_ref()));
+    let res = f.as_mut().poll(&mut Context::from_waker(Waker::noop()));
     let Poll::Ready(Err(mut f)) = res else {
       panic!("wasn't cancelled!");
     };
     assert!(
-      f.poll_unpin(&mut Context::from_waker(noop_waker_ref()))
+      f.poll_unpin(&mut Context::from_waker(Waker::noop()))
         .is_pending()
     );
   }
@@ -876,14 +876,14 @@ mod tests {
     let cancel_handle = Rc::new(CancelHandle::new());
     let f = CountdownFuture(2, "hello world!".into());
     let mut f = Box::pin(f.or_abort(cancel_handle.clone()));
-    let res = f.as_mut().poll(&mut Context::from_waker(noop_waker_ref()));
+    let res = f.as_mut().poll(&mut Context::from_waker(Waker::noop()));
     assert!(res.is_pending());
     cancel_handle.clone().cancel();
-    let res = f.as_mut().poll(&mut Context::from_waker(noop_waker_ref()));
+    let res = f.as_mut().poll(&mut Context::from_waker(Waker::noop()));
     let Poll::Ready(Err(mut f)) = res else {
       panic!("wasn't cancelled!");
     };
-    let res = f.poll_unpin(&mut Context::from_waker(noop_waker_ref()));
+    let res = f.poll_unpin(&mut Context::from_waker(Waker::noop()));
     assert_eq!(res, Poll::Ready("hello world!".into()));
   }
 
@@ -1013,7 +1013,7 @@ mod tests {
     // There are two `Rc<CancelHandle>` references now, so this fails.
     assert!(Rc::get_mut(&mut cancel_handle).is_none());
 
-    let mut cx = Context::from_waker(noop_waker_ref());
+    let mut cx = Context::from_waker(Waker::noop());
     assert!(future.poll(&mut cx).is_pending());
 
     // Polling `future` has established a link between the future and
diff --git a/core/async_cell.rs b/core/async_cell.rs
index 9bebb97..68c4b2d 100644
--- a/core/async_cell.rs
+++ b/core/async_cell.rs
@@ -243,18 +243,18 @@ mod internal {
   use super::AsyncRefCell;
   use super::RcLike;
   use super::RcRef;
-  use futures::future::Future;
-  use futures::ready;
-  use futures::task::Context;
-  use futures::task::Poll;
-  use futures::task::Waker;
   use std::borrow::Borrow;
   use std::borrow::BorrowMut;
   use std::fmt::Debug;
+  use std::future::Future;
   use std::marker::PhantomData;
   use std::ops::Deref;
   use std::ops::DerefMut;
   use std::pin::Pin;
+  use std::task::Context;
+  use std::task::Poll;
+  use std::task::Waker;
+  use std::task::ready;
 
   impl<T> AsyncRefCell<T> {
     /// Borrow the cell's contents synchronously without creating an
diff --git a/core/inspector.rs b/core/inspector.rs
index c9c5ed8..770d973 100644
--- a/core/inspector.rs
+++ b/core/inspector.rs
@@ -15,8 +15,6 @@ use crate::futures::prelude::*;
 use crate::futures::stream::SelectAll;
 use crate::futures::stream::StreamExt;
 use crate::futures::task;
-use crate::futures::task::Context;
-use crate::futures::task::Poll;
 use crate::serde_json::Value;
 use crate::serde_json::json;
 use deno_error::JsErrorBox;
@@ -32,6 +30,8 @@ use std::ptr;
 use std::ptr::NonNull;
 use std::rc::Rc;
 use std::sync::Arc;
+use std::task::Context;
+use std::task::Poll;
 use std::thread;
 use v8::HandleScope;
 
diff --git a/core/io/mod.rs b/core/io/mod.rs
index 4c38989..70bc6a9 100644
--- a/core/io/mod.rs
+++ b/core/io/mod.rs
@@ -6,7 +6,7 @@
 // resources. Resources may or may not correspond to a real operating system
 // file descriptor (hence the different name).
 
-use futures::Future;
+use std::future::Future;
 use std::pin::Pin;
 
 mod buffer_strategy;
diff --git a/core/io/resource.rs b/core/io/resource.rs
index 418a9ed..ab5b696 100644
--- a/core/io/resource.rs
+++ b/core/io/resource.rs
@@ -85,7 +85,7 @@ pub trait Resource: Any + 'static {
   /// implement `read_byob()`.
   fn read(self: Rc<Self>, limit: usize) -> AsyncResult<BufView> {
     _ = limit;
-    Box::pin(futures::future::err(JsErrorBox::not_supported()))
+    Box::pin(std::future::ready(Err(JsErrorBox::not_supported())))
   }
 
   /// Read a single chunk of data from the resource into the provided `BufMutView`.
@@ -111,7 +111,7 @@ pub trait Resource: Any + 'static {
 
   /// Write an error state to this resource, if the resource supports it.
   fn write_error(self: Rc<Self>, _error: &dyn JsErrorClass) -> AsyncResult<()> {
-    Box::pin(futures::future::err(JsErrorBox::not_supported()))
+    Box::pin(std::future::ready(Err(JsErrorBox::not_supported())))
   }
 
   /// Write a single chunk of data to the resource. The operation may not be
@@ -123,7 +123,7 @@ pub trait Resource: Any + 'static {
   /// with a "not supported" error.
   fn write(self: Rc<Self>, buf: BufView) -> AsyncResult<WriteOutcome> {
     _ = buf;
-    Box::pin(futures::future::err(JsErrorBox::not_supported()))
+    Box::pin(std::future::ready(Err(JsErrorBox::not_supported())))
   }
 
   /// Write an entire chunk of data to the resource. Unlike `write()`, this will
@@ -175,7 +175,7 @@ pub trait Resource: Any + 'static {
   /// If this method is not implemented, the default implementation will error
   /// with a "not supported" error.
   fn shutdown(self: Rc<Self>) -> AsyncResult<()> {
-    Box::pin(futures::future::err(JsErrorBox::not_supported()))
+    Box::pin(std::future::ready(Err(JsErrorBox::not_supported())))
   }
 
   /// Resources may implement the `close()` trait method if they need to do
diff --git a/core/modules/map.rs b/core/modules/map.rs
index 48ad0aa..abcd428 100644
--- a/core/modules/map.rs
+++ b/core/modules/map.rs
@@ -33,13 +33,13 @@ use crate::runtime::SnapshotStoreDataStore;
 use crate::runtime::exception_state::ExceptionState;
 use capacity_builder::StringBuilder;
 use deno_error::JsErrorBox;
-use futures::Future;
 use futures::StreamExt;
 use futures::future::FutureExt;
 use futures::stream::FuturesUnordered;
 use futures::stream::StreamFuture;
 use futures::task::AtomicWaker;
 use indexmap::IndexMap;
+use std::future::Future;
 use v8::Function;
 use v8::PromiseState;
 use wasm_dep_analyzer::WasmDeps;
diff --git a/core/runtime/jsruntime.rs b/core/runtime/jsruntime.rs
index 0ef6c9a..ebdddba 100644
--- a/core/runtime/jsruntime.rs
+++ b/core/runtime/jsruntime.rs
@@ -61,12 +61,12 @@ use crate::source_map::SourceMapData;
 use crate::source_map::SourceMapper;
 use crate::stats::RuntimeActivityType;
 use deno_error::JsErrorBox;
-use futures::Future;
 use futures::FutureExt;
-use futures::future::poll_fn;
 use futures::task::AtomicWaker;
 use smallvec::SmallVec;
 use std::any::Any;
+use std::future::Future;
+use std::future::poll_fn;
 use v8::MessageErrorLevel;
 
 use std::cell::Cell;
@@ -1421,7 +1421,7 @@ impl JsRuntime {
       let isolate = self.v8_isolate();
       let scope = &mut realm.handle_scope(isolate);
       module_map.mod_evaluate_sync(scope, mod_id)?;
-      let mut cx = Context::from_waker(futures::task::noop_waker_ref());
+      let mut cx = Context::from_waker(Waker::noop());
       // poll once so code cache is populated. the `ExtCodeCache` trait is sync, so
       // the `CodeCacheReady` futures will always finish on the first poll.
       let _ = module_map.poll_progress(&mut cx, scope);
diff --git a/core/runtime/op_driver/future_arena.rs b/core/runtime/op_driver/future_arena.rs
index 5244de1..4f13623 100644
--- a/core/runtime/op_driver/future_arena.rs
+++ b/core/runtime/op_driver/future_arena.rs
@@ -233,9 +233,9 @@ impl<T, C: Clone> FutureArena<T, C> {
 mod tests {
   use super::*;
   use futures::FutureExt;
-  use futures::task::noop_waker_ref;
   use std::fmt::Display;
   use std::future::ready;
+  use std::task::Waker;
 
   const INFO: usize = 0;
 
@@ -258,8 +258,7 @@ mod tests {
 
     // Poll unmapped
     let mut f = arena.allocate(INFO, async { 1 });
-    let Poll::Ready(v) =
-      f.poll_unpin(&mut Context::from_waker(noop_waker_ref()))
+    let Poll::Ready(v) = f.poll_unpin(&mut Context::from_waker(Waker::noop()))
     else {
       panic!();
     };
@@ -267,8 +266,7 @@ mod tests {
 
     // Poll Mapped
     let mut f = arena.allocate(INFO, async { 1 }).erase();
-    let Poll::Ready(v) =
-      f.poll_unpin(&mut Context::from_waker(noop_waker_ref()))
+    let Poll::Ready(v) = f.poll_unpin(&mut Context::from_waker(Waker::noop()))
     else {
       panic!();
     };
diff --git a/core/runtime/op_driver/futures_unordered_driver.rs b/core/runtime/op_driver/futures_unordered_driver.rs
index 5e7d0de..4c4a26d 100644
--- a/core/runtime/op_driver/futures_unordered_driver.rs
+++ b/core/runtime/op_driver/futures_unordered_driver.rs
@@ -14,18 +14,18 @@ use deno_unsync::UnsyncWaker;
 use deno_unsync::spawn;
 use futures::FutureExt;
 use futures::Stream;
-use futures::future::poll_fn;
 use futures::stream::FuturesUnordered;
-use futures::task::noop_waker_ref;
 use std::cell::Cell;
 use std::cell::RefCell;
 use std::collections::VecDeque;
 use std::future::Future;
+use std::future::poll_fn;
 use std::future::ready;
 use std::pin::Pin;
 use std::rc::Rc;
 use std::task::Context;
 use std::task::Poll;
+use std::task::Waker;
 use std::task::ready;
 
 async fn poll_task<C: OpMappingContext>(
@@ -149,7 +149,7 @@ impl<C: OpMappingContext> OpDriver<C> for FuturesUnorderedDriver<C> {
 
       // We poll every future here because it's much faster to return a result than
       // spin the event loop to get it.
-      match pinned.poll_unpin(&mut Context::from_waker(noop_waker_ref())) {
+      match pinned.poll_unpin(&mut Context::from_waker(Waker::noop())) {
         Poll::Pending => self.spawn(pinned.erase()),
         Poll::Ready(res) => {
           if DEFERRED {
@@ -190,8 +190,7 @@ impl<C: OpMappingContext> OpDriver<C> for FuturesUnorderedDriver<C> {
 
       // We poll every future here because it's much faster to return a result than
       // spin the event loop to get it.
-      match Pin::new(&mut pinned)
-        .poll(&mut Context::from_waker(noop_waker_ref()))
+      match Pin::new(&mut pinned).poll(&mut Context::from_waker(Waker::noop()))
       {
         Poll::Pending => self.spawn(pinned.erase()),
         Poll::Ready(res) => {
diff --git a/core/runtime/ops.rs b/core/runtime/ops.rs
index 94ad207..a614da4 100644
--- a/core/runtime/ops.rs
+++ b/core/runtime/ops.rs
@@ -5,12 +5,12 @@ use super::op_driver::OpScheduling;
 use super::op_driver::V8RetValMapper;
 use crate::ops::*;
 use deno_error::JsErrorClass;
-use futures::future::Future;
 use serde::Deserialize;
 use serde_v8::V8Sliceable;
 use serde_v8::from_v8;
 use std::borrow::Cow;
 use std::ffi::c_void;
+use std::future::Future;
 use std::mem::MaybeUninit;
 use std::ptr::NonNull;
 
@@ -555,13 +555,13 @@ mod tests {
   use crate::runtime::JsRuntimeState;
   use bytes::BytesMut;
   use deno_error::JsErrorBox;
-  use futures::Future;
   use serde::Deserialize;
   use serde::Serialize;
   use serde_v8::JsBuffer;
   use std::borrow::Cow;
   use std::cell::Cell;
   use std::cell::RefCell;
+  use std::future::Future;
   use std::rc::Rc;
   use std::time::Duration;
 
diff --git a/core/web_timeout.rs b/core/web_timeout.rs
index 585add9..29b559b 100644
--- a/core/web_timeout.rs
+++ b/core/web_timeout.rs
@@ -4,7 +4,6 @@ use cooked_waker::IntoWaker;
 use cooked_waker::ViaRawPointer;
 use cooked_waker::Wake;
 use cooked_waker::WakeRef;
-use futures::Future;
 use std::cell::Cell;
 use std::cell::Ref;
 use std::cell::RefCell;
@@ -12,6 +11,7 @@ use std::cell::UnsafeCell;
 use std::collections::BTreeMap;
 use std::collections::BTreeSet;
 use std::collections::btree_set;
+use std::future::Future;
 use std::mem::MaybeUninit;
 use std::num::NonZeroU64;
 use std::pin::Pin;
@@ -594,8 +594,8 @@ impl HighResTimerLock {
 #[cfg(test)]
 mod tests {
   use super::*;
-  use futures::future::poll_fn;
   use rstest::rstest;
+  use std::future::poll_fn;
 
   /// Miri is way too slow here on some of the larger tests.
   const TEN_THOUSAND: u64 = if cfg!(miri) { 100 } else { 10_000 };
diff --git a/dcore/src/inspector_server.rs b/dcore/src/inspector_server.rs
index c56fe3e..7a91aa0 100644
--- a/dcore/src/inspector_server.rs
+++ b/dcore/src/inspector_server.rs
@@ -15,7 +15,6 @@ use deno_core::futures::channel::oneshot;
 use deno_core::futures::prelude::*;
 use deno_core::futures::select;
 use deno_core::futures::stream::StreamExt;
-use deno_core::futures::task::Poll;
 use deno_core::serde_json::Value;
 use deno_core::serde_json::json;
 use deno_core::unsync::spawn;
@@ -31,6 +30,7 @@ use std::net::SocketAddr;
 use std::pin::pin;
 use std::process;
 use std::rc::Rc;
+use std::task::Poll;
 use std::thread;
 use tokio::net::TcpListener;
 use tokio::sync::broadcast;


Test patch:
diff --git a/core/modules/tests.rs b/core/modules/tests.rs
index dfbd70c..d03e005 100644
--- a/core/modules/tests.rs
+++ b/core/modules/tests.rs
@@ -33,7 +33,6 @@ use deno_error::JsErrorBox;
 use deno_error::JsErrorClass;
 use deno_ops::op2;
 use futures::future::FutureExt;
-use futures::future::poll_fn;
 use parking_lot::Mutex;
 use std::any::Any;
 use std::borrow::Cow;
@@ -41,6 +40,7 @@ use std::cell::RefCell;
 use std::collections::HashMap;
 use std::fmt;
 use std::future::Future;
+use std::future::poll_fn;
 use std::pin::Pin;
 use std::rc::Rc;
 use std::sync::Arc;
diff --git a/core/runtime/tests/error.rs b/core/runtime/tests/error.rs
index b99da92..c8a55d3 100644
--- a/core/runtime/tests/error.rs
+++ b/core/runtime/tests/error.rs
@@ -5,7 +5,7 @@ use crate::RuntimeOptions;
 use crate::error::CoreError;
 use crate::op2;
 use deno_error::JsErrorBox;
-use futures::future::poll_fn;
+use std::future::poll_fn;
 use std::task::Poll;
 
 #[tokio::test]
diff --git a/core/runtime/tests/jsrealm.rs b/core/runtime/tests/jsrealm.rs
index c2f370e..dad8c79 100644
--- a/core/runtime/tests/jsrealm.rs
+++ b/core/runtime/tests/jsrealm.rs
@@ -6,7 +6,7 @@ use crate::RuntimeOptions;
 use crate::error::CoreError;
 use crate::modules::StaticModuleLoader;
 use crate::op2;
-use futures::future::poll_fn;
+use std::future::poll_fn;
 use std::rc::Rc;
 use std::task::Poll;
 
@@ -82,7 +82,7 @@ async fn js_realm_ref_unref_ops() {
   // Never resolves.
   #[op2(async)]
   async fn op_pending() {
-    futures::future::pending().await
+    std::future::pending().await
   }
 
   deno_core::extension!(test_ext, ops = [op_pending]);
diff --git a/core/runtime/tests/misc.rs b/core/runtime/tests/misc.rs
index ff6db68..934eb9a 100644
--- a/core/runtime/tests/misc.rs
+++ b/core/runtime/tests/misc.rs
@@ -9,12 +9,12 @@ use cooked_waker::IntoWaker;
 use cooked_waker::Wake;
 use cooked_waker::WakeRef;
 use deno_error::JsErrorBox;
-use futures::future::poll_fn;
 use parking_lot::Mutex;
 use rstest::rstest;
 use std::borrow::Cow;
 use std::collections::HashMap;
 use std::collections::HashSet;
+use std::future::poll_fn;
 use std::rc::Rc;
 use std::sync::Arc;
 use std::sync::atomic::AtomicBool;
diff --git a/core/runtime/tests/ops.rs b/core/runtime/tests/ops.rs
index 8129d3e..d753712 100644
--- a/core/runtime/tests/ops.rs
+++ b/core/runtime/tests/ops.rs
@@ -8,9 +8,9 @@ use crate::runtime::tests::Mode;
 use crate::runtime::tests::setup;
 use crate::*;
 use deno_error::JsErrorBox;
-use futures::Future;
 use pretty_assertions::assert_eq;
 use std::cell::RefCell;
+use std::future::Future;
 use std::rc::Rc;
 use std::sync::atomic::Ordering;
 use std::time::Duration;
diff --git a/testing/checkin/runner/mod.rs b/testing/checkin/runner/mod.rs
index 3624b25..0d63723 100644
--- a/testing/checkin/runner/mod.rs
+++ b/testing/checkin/runner/mod.rs
@@ -14,11 +14,11 @@ use deno_core::ModuleSourceCode;
 use deno_core::RuntimeOptions;
 use deno_core::v8;
 use deno_error::JsErrorBox;
-use futures::Future;
 use std::any::Any;
 use std::any::TypeId;
 use std::borrow::Cow;
 use std::collections::HashMap;
+use std::future::Future;
 use std::rc::Rc;
 use std::sync::Arc;
 use std::sync::Mutex;
diff --git a/testing/checkin/runner/ops_async.rs b/testing/checkin/runner/ops_async.rs
index 785fdfd..b8c6671 100644
--- a/testing/checkin/runner/ops_async.rs
+++ b/testing/checkin/runner/ops_async.rs
@@ -8,9 +8,9 @@ use deno_core::V8TaskSpawner;
 use deno_core::op2;
 use deno_core::v8;
 use deno_error::JsErrorBox;
-use futures::future::poll_fn;
 use std::cell::RefCell;
 use std::future::Future;
+use std::future::poll_fn;
 use std::rc::Rc;
 
 #[op2]
@@ -85,7 +85,7 @@ pub async fn op_async_get_cppgc_resource(
 
 #[op2(async)]
 pub fn op_async_never_resolves() -> impl Future<Output = ()> {
-  futures::future::pending::<()>()
+  std::future::pending::<()>()
 }
 
 #[op2(async(fake))]