From cf6f785661b9d7159dcc88bb923c40d45a20b97f Mon Sep 17 00:00:00 2001 From: temportalflux Date: Thu, 25 Jun 2026 16:05:20 -0400 Subject: [PATCH] replace async-io timer with background executor timer --- Cargo.lock | 1 - Cargo.toml | 1 - crates/gpui_elements/Cargo.toml | 1 - crates/gpui_elements/src/editable_text/caret.rs | 4 ++-- 4 files changed, 2 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e01de885c8..ab9fdd6f6c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2425,7 +2425,6 @@ dependencies = [ name = "gpui_elements" version = "0.1.0" dependencies = [ - "async-io", "gpui", "smallvec", "unicode-segmentation", diff --git a/Cargo.toml b/Cargo.toml index 2cef8a084f..d753f97430 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -31,7 +31,6 @@ accesskit_macos = "0.26.0" accesskit_unix = "0.22.0" accesskit_windows = "0.32.1" anyhow = "1.0.86" -async-io = "2.6" backtrace = "0.3" bitflags = "2.6.0" collections = { git = "https://github.com/zed-industries/zed", rev = "876ec5a8a074ba83cce2129ed4d76b59c05a37e9", version = "0.1.0" } diff --git a/crates/gpui_elements/Cargo.toml b/crates/gpui_elements/Cargo.toml index 7220c878bb..07d893acb0 100644 --- a/crates/gpui_elements/Cargo.toml +++ b/crates/gpui_elements/Cargo.toml @@ -13,7 +13,6 @@ ignored = ["gpui"] [dependencies] gpui.workspace = true -async-io.workspace = true unicode-segmentation.workspace = true smallvec.workspace = true diff --git a/crates/gpui_elements/src/editable_text/caret.rs b/crates/gpui_elements/src/editable_text/caret.rs index d7a5044d36..70421ca74a 100644 --- a/crates/gpui_elements/src/editable_text/caret.rs +++ b/crates/gpui_elements/src/editable_text/caret.rs @@ -134,7 +134,7 @@ impl Caret { let interval = self.interval; cx.spawn(async move |this, cx| { - async_io::Timer::after(interval).await; + cx.background_executor().timer(interval).await; this.update(cx, |this, cx| { if this.generation == generation { this.paused = false; @@ -158,7 +158,7 @@ impl Caret { let interval = self.interval; cx.spawn(async move |this, cx| { - async_io::Timer::after(interval).await; + cx.background_executor().timer(interval).await; if let Some(this) = this.upgrade() { this.update(cx, |this, cx| { if this.generation == generation {