Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Add test tag

Mikayla8bbced50c27b
diff --git a/crates/gpui2/src/util.rs b/crates/gpui2/src/util.rs
index 3ee80306ea3..cba7ed84b58 100644
--- a/crates/gpui2/src/util.rs
+++ b/crates/gpui2/src/util.rs
@@ -1,9 +1,15 @@
+#[cfg(any(test, feature = "test-support"))]
use std::time::Duration;
+#[cfg(any(test, feature = "test-support"))]
use futures::Future;
+
+#[cfg(any(test, feature = "test-support"))]
use smol::future::FutureExt;
+
pub use util::*;
+#[cfg(any(test, feature = "test-support"))]
pub async fn timeout<F, T>(timeout: Duration, f: F) -> Result<T, ()>
where
F: Future<Output = T>,