Skip to content

Commit

Permalink
Fix failing cargo check with only the bevy_dev_tools feature (#15743)
Browse files Browse the repository at this point in the history
# Objective
Fixes #15741

## Solution

- Copied the feature gates of a type to where the type is used.

## Testing

- `cargo check` works now using only the bevy_dev_tools feature
  • Loading branch information
papow65 authored Oct 8, 2024
1 parent 26813d9 commit 01b37d6
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions crates/bevy_gizmos/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,10 @@ use bevy_ecs::{
use bevy_math::Vec3;
use bevy_reflect::TypePath;

#[cfg(all(
feature = "bevy_render",
any(feature = "bevy_pbr", feature = "bevy_sprite")
))]
use crate::config::GizmoMeshConfig;

#[cfg(feature = "bevy_render")]
Expand Down Expand Up @@ -600,7 +604,10 @@ impl<const I: usize, P: PhaseItem> RenderCommand<P> for SetLineGizmoBindGroup<I>

#[cfg(feature = "bevy_render")]
struct DrawLineGizmo;
#[cfg(feature = "bevy_render")]
#[cfg(all(
feature = "bevy_render",
any(feature = "bevy_pbr", feature = "bevy_sprite")
))]
impl<P: PhaseItem> RenderCommand<P> for DrawLineGizmo {
type Param = SRes<RenderAssets<GpuLineGizmo>>;
type ViewQuery = ();
Expand Down Expand Up @@ -653,7 +660,10 @@ impl<P: PhaseItem> RenderCommand<P> for DrawLineGizmo {

#[cfg(feature = "bevy_render")]
struct DrawLineJointGizmo;
#[cfg(feature = "bevy_render")]
#[cfg(all(
feature = "bevy_render",
any(feature = "bevy_pbr", feature = "bevy_sprite")
))]
impl<P: PhaseItem> RenderCommand<P> for DrawLineJointGizmo {
type Param = SRes<RenderAssets<GpuLineGizmo>>;
type ViewQuery = ();
Expand Down

0 comments on commit 01b37d6

Please sign in to comment.