mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-30 14:17:02 +00:00
Add test tag
This commit is contained in:
parent
d197660d3b
commit
8bbced50c2
1 changed files with 6 additions and 0 deletions
|
@ -1,9 +1,15 @@
|
||||||
|
#[cfg(any(test, feature = "test-support"))]
|
||||||
use std::time::Duration;
|
use std::time::Duration;
|
||||||
|
|
||||||
|
#[cfg(any(test, feature = "test-support"))]
|
||||||
use futures::Future;
|
use futures::Future;
|
||||||
|
|
||||||
|
#[cfg(any(test, feature = "test-support"))]
|
||||||
use smol::future::FutureExt;
|
use smol::future::FutureExt;
|
||||||
|
|
||||||
pub use util::*;
|
pub use util::*;
|
||||||
|
|
||||||
|
#[cfg(any(test, feature = "test-support"))]
|
||||||
pub async fn timeout<F, T>(timeout: Duration, f: F) -> Result<T, ()>
|
pub async fn timeout<F, T>(timeout: Duration, f: F) -> Result<T, ()>
|
||||||
where
|
where
|
||||||
F: Future<Output = T>,
|
F: Future<Output = T>,
|
||||||
|
|
Loading…
Reference in a new issue