Fix errors from conditional compilation in timer functions

This commit is contained in:
Max Brunsfeld 2022-03-04 16:54:12 -08:00
parent fab115e549
commit 4124308d94
3 changed files with 67 additions and 60 deletions

View file

@ -5079,14 +5079,14 @@ mod tests {
}
impl Executor for Arc<gpui::executor::Background> {
type Timer = BoxFuture<'static, ()>;
type Timer = gpui::executor::Timer;
fn spawn_detached<F: 'static + Send + Future<Output = ()>>(&self, future: F) {
self.spawn(future).detach();
}
fn timer(&self, duration: Duration) -> Self::Timer {
self.as_ref().timer(duration).boxed()
self.as_ref().timer(duration)
}
}