Skip to content

Commit

Permalink
gate an import used only for a debug assert (#7165)
Browse files Browse the repository at this point in the history
# Objective

- There is a warning when building in release:
```
warning: unused import: `bevy_ecs::system::Local`
 --> crates/bevy_render/src/extract_resource.rs:5:5
  |
5 | use bevy_ecs::system::Local;
  |     ^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: `#[warn(unused_imports)]` on by default
```
- It's used https://github.com/bevyengine/bevy/blob/59751d6e33d94eff6e1fc20c9ae155974b3860b1/crates/bevy_render/src/extract_resource.rs#L47
- Fix it

## Solution

- Gate the import
- repeat of #5320
  • Loading branch information
mockersf committed Jan 11, 2023
1 parent 59751d6 commit aa3dd14
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions crates/bevy_render/src/extract_resource.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ use std::marker::PhantomData;

use bevy_app::{App, Plugin};
use bevy_ecs::change_detection::DetectChanges;
#[cfg(debug_assertions)]
use bevy_ecs::system::Local;
use bevy_ecs::system::{Commands, Res, ResMut, Resource};
pub use bevy_render_macros::ExtractResource;
Expand Down

0 comments on commit aa3dd14

Please sign in to comment.