mirror of
https://github.com/storytold/storyteller-bevy.git
synced 2026-10-18 07:35:19 +00:00
simplify conditional compilation and fix bug
This commit is contained in:
@@ -91,11 +91,13 @@ impl AssetReader for RemoteAssetReader {
|
||||
let unboxed = async move {
|
||||
self.load(path).await
|
||||
};
|
||||
if cfg!(headless_cli) {
|
||||
if cfg!(not(feature = "wasm")) {
|
||||
info!("wasm mode not detected");
|
||||
// NB: Headless mode (server rendering) is running without a Tokio runtime.
|
||||
// The reqwest HTTP client requires async-compat to function at runtime.
|
||||
Box::pin(Compat::new(unboxed))
|
||||
} else {
|
||||
info!("wasm mode");
|
||||
Box::pin(unboxed)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user