Fix various unused import warnings with no features enabled (#18580)
# Objective Per title. I was using the `bevy_gizmos` crate without the `webgl` feature enabled, and noticed there were other warnings with no features enabled as well. ## Testing - `cargo check -p bevy_gizmos --no-default-features` - `cargo check -p bevy_gizmos --all-features` - `cargo run -p ci -- test` - Ran gizmo examples.
This commit is contained in:
parent
0afd9ea806
commit
e50a42ad8b
14
crates/bevy_gizmos/src/lib.rs
Normal file → Executable file
14
crates/bevy_gizmos/src/lib.rs
Normal file → Executable file
@ -79,13 +79,12 @@ pub mod prelude {
|
|||||||
}
|
}
|
||||||
|
|
||||||
use bevy_app::{App, FixedFirst, FixedLast, Last, Plugin, RunFixedMainLoop};
|
use bevy_app::{App, FixedFirst, FixedLast, Last, Plugin, RunFixedMainLoop};
|
||||||
use bevy_asset::{weak_handle, Asset, AssetApp, AssetId, Assets, Handle};
|
use bevy_asset::{Asset, AssetApp, Assets, Handle};
|
||||||
use bevy_ecs::{
|
use bevy_ecs::{
|
||||||
resource::Resource,
|
resource::Resource,
|
||||||
schedule::{IntoScheduleConfigs, SystemSet},
|
schedule::{IntoScheduleConfigs, SystemSet},
|
||||||
system::{Res, ResMut},
|
system::{Res, ResMut},
|
||||||
};
|
};
|
||||||
use bevy_math::{Vec3, Vec4};
|
|
||||||
use bevy_reflect::TypePath;
|
use bevy_reflect::TypePath;
|
||||||
|
|
||||||
#[cfg(all(
|
#[cfg(all(
|
||||||
@ -99,6 +98,7 @@ use crate::{config::ErasedGizmoConfigGroup, gizmos::GizmoBuffer};
|
|||||||
#[cfg(feature = "bevy_render")]
|
#[cfg(feature = "bevy_render")]
|
||||||
use {
|
use {
|
||||||
crate::retained::extract_linegizmos,
|
crate::retained::extract_linegizmos,
|
||||||
|
bevy_asset::{weak_handle, AssetId},
|
||||||
bevy_ecs::{
|
bevy_ecs::{
|
||||||
component::Component,
|
component::Component,
|
||||||
entity::Entity,
|
entity::Entity,
|
||||||
@ -108,7 +108,7 @@ use {
|
|||||||
Commands, SystemParamItem,
|
Commands, SystemParamItem,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
bevy_math::{Affine3, Affine3A},
|
bevy_math::{Affine3, Affine3A, Vec4},
|
||||||
bevy_render::{
|
bevy_render::{
|
||||||
extract_component::{ComponentUniforms, DynamicUniformIndex, UniformComponentPlugin},
|
extract_component::{ComponentUniforms, DynamicUniformIndex, UniformComponentPlugin},
|
||||||
render_asset::{PrepareAssetError, RenderAsset, RenderAssetPlugin, RenderAssets},
|
render_asset::{PrepareAssetError, RenderAsset, RenderAssetPlugin, RenderAssets},
|
||||||
@ -132,9 +132,9 @@ use {
|
|||||||
use bevy_render::render_resource::{VertexAttribute, VertexBufferLayout, VertexStepMode};
|
use bevy_render::render_resource::{VertexAttribute, VertexBufferLayout, VertexStepMode};
|
||||||
use bevy_time::Fixed;
|
use bevy_time::Fixed;
|
||||||
use bevy_utils::TypeIdMap;
|
use bevy_utils::TypeIdMap;
|
||||||
use config::{
|
#[cfg(feature = "bevy_render")]
|
||||||
DefaultGizmoConfigGroup, GizmoConfig, GizmoConfigGroup, GizmoConfigStore, GizmoLineJoint,
|
use config::GizmoLineJoint;
|
||||||
};
|
use config::{DefaultGizmoConfigGroup, GizmoConfig, GizmoConfigGroup, GizmoConfigStore};
|
||||||
use core::{any::TypeId, marker::PhantomData, mem};
|
use core::{any::TypeId, marker::PhantomData, mem};
|
||||||
use gizmos::{GizmoStorage, Swap};
|
use gizmos::{GizmoStorage, Swap};
|
||||||
#[cfg(all(feature = "bevy_pbr", feature = "bevy_render"))]
|
#[cfg(all(feature = "bevy_pbr", feature = "bevy_render"))]
|
||||||
@ -503,7 +503,7 @@ struct LineGizmoUniform {
|
|||||||
line_scale: f32,
|
line_scale: f32,
|
||||||
/// WebGL2 structs must be 16 byte aligned.
|
/// WebGL2 structs must be 16 byte aligned.
|
||||||
#[cfg(feature = "webgl")]
|
#[cfg(feature = "webgl")]
|
||||||
_padding: Vec3,
|
_padding: bevy_math::Vec3,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A collection of gizmos.
|
/// A collection of gizmos.
|
||||||
|
Loading…
Reference in New Issue
Block a user