Remove Executor::block_on and simplify Compositor creation

This commit is contained in:
Héctor Ramón Jiménez 2025-04-02 10:39:27 +02:00
parent baadcc150f
commit 57cb14ce38
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
13 changed files with 58 additions and 108 deletions

View file

@ -1,4 +1,5 @@
//! A backend that does nothing!
use crate::MaybeSend;
/// An executor that drops all the futures, instead of spawning them.
#[derive(Debug)]
@ -9,17 +10,7 @@ impl crate::Executor for Executor {
Ok(Self)
}
#[cfg(not(target_arch = "wasm32"))]
fn spawn(&self, _future: impl Future<Output = ()> + Send + 'static) {}
#[cfg(target_arch = "wasm32")]
fn spawn(&self, _future: impl Future<Output = ()> + 'static) {}
#[cfg(not(target_arch = "wasm32"))]
fn block_on(_future: impl Future<Output = ()> + 'static) {}
#[cfg(target_arch = "wasm32")]
fn block_on(_future: impl Future<Output = ()> + 'static) {}
fn spawn(&self, _future: impl Future<Output = ()> + MaybeSend + 'static) {}
}
pub mod time {