Skip to content

Commit 5f567d7

Browse files
authored
gate SceneLoaderError behind same feature as scene loader (#22143)
# Objective - Fixes #22138 - Asset loader is gated by a feature, but the asset loader error type isn't ## Solution - Gate the asset loader error type behind the same feature as the asset loader
1 parent 3ab5c2c commit 5f567d7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

crates/bevy_scene/src/scene_loader.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ use bevy_ecs::{
33
world::{FromWorld, World},
44
};
55
use bevy_reflect::TypeRegistryArc;
6-
use thiserror::Error;
76

87
#[cfg(feature = "serialize")]
98
use {
109
crate::{serde::SceneDeserializer, DynamicScene},
1110
bevy_asset::{io::Reader, AssetLoader, LoadContext},
1211
serde::de::DeserializeSeed,
12+
thiserror::Error,
1313
};
1414

1515
/// Asset loader for a Bevy dynamic scene (`.scn` / `.scn.ron`).
@@ -34,6 +34,7 @@ impl FromWorld for SceneLoader {
3434
}
3535

3636
/// Possible errors that can be produced by [`SceneLoader`]
37+
#[cfg(feature = "serialize")]
3738
#[non_exhaustive]
3839
#[derive(Debug, Error)]
3940
pub enum SceneLoaderError {

0 commit comments

Comments
 (0)