Skip to content

Commit 2765ba8

Browse files
authored
Fix compilation errors and warnings when running bevy_gltf with no features. (#22125)
# Objective - #22106 accidentally added imports for AnimationClip, HashMap, and HashSet - but these are only available/used if the bevy_animation feature is enabled. So running `cargo t -p bevy_gltf` fails to compile and gives warnings! ## Solution - Guard these `use` statements on the bevy_animation feature. ## Testing - Ran `cargo t -p bevy_gltf`. - Ran `cargo t -p bevy_gltf --all-features`.
1 parent 45955c7 commit 2765ba8

File tree

1 file changed

+6
-2
lines changed
  • crates/bevy_gltf/src/loader/extensions

1 file changed

+6
-2
lines changed

crates/bevy_gltf/src/loader/extensions/mod.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,21 @@ mod khr_materials_specular;
77
use alloc::sync::Arc;
88
use async_lock::RwLock;
99

10-
use bevy_animation::AnimationClip;
1110
use bevy_asset::{Handle, LoadContext};
1211
use bevy_ecs::{
1312
entity::Entity,
1413
resource::Resource,
1514
world::{EntityWorldMut, World},
1615
};
1716
use bevy_pbr::StandardMaterial;
18-
use bevy_platform::collections::{HashMap, HashSet};
1917
use gltf::Node;
2018

19+
#[cfg(feature = "bevy_animation")]
20+
use {
21+
bevy_animation::AnimationClip,
22+
bevy_platform::collections::{HashMap, HashSet},
23+
};
24+
2125
use crate::GltfMesh;
2226

2327
pub(crate) use self::{

0 commit comments

Comments
 (0)