diff --git a/crates/bevy_asset/src/io/mod.rs b/crates/bevy_asset/src/io/mod.rs index a249d7d061..de405df44a 100644 --- a/crates/bevy_asset/src/io/mod.rs +++ b/crates/bevy_asset/src/io/mod.rs @@ -574,9 +574,11 @@ pub(crate) fn get_meta_path(path: &Path) -> PathBuf { meta_path } +#[cfg(any(target_arch = "wasm32", target_os = "android"))] /// A [`PathBuf`] [`Stream`] implementation that immediately returns nothing. struct EmptyPathStream; +#[cfg(any(target_arch = "wasm32", target_os = "android"))] impl Stream for EmptyPathStream { type Item = PathBuf; diff --git a/crates/bevy_gltf/src/loader.rs b/crates/bevy_gltf/src/loader.rs index ee36ce7415..dcdf5929f4 100644 --- a/crates/bevy_gltf/src/loader.rs +++ b/crates/bevy_gltf/src/loader.rs @@ -508,9 +508,9 @@ async fn load_gltf<'a, 'b, 'c>( mesh.set_morph_targets(handle); let extras = gltf_mesh.extras().as_ref(); - if let Option::::Some(names) = - extras.and_then(|extras| serde_json::from_str(extras.get()).ok()) - { + if let Some(names) = extras.and_then(|extras| { + serde_json::from_str::(extras.get()).ok() + }) { mesh.set_morph_target_names(names.target_names); } }