Repository navigation
[Merged by Bors] - fix "unused" warnings when compiling with render feature but without animation - #4714
Closed
jakobhellermann wants to merge 2 commits into
Closed
[Merged by Bors] - fix "unused" warnings when compiling with render feature but without animation#4714jakobhellermann wants to merge 2 commits into
render feature but without animation#4714jakobhellermann wants to merge 2 commits into
Conversation
IceSentry
approved these changes
May 10, 2022
DJMcNab
reviewed
May 10, 2022
| #[cfg(feature = "bevy_animation")] | ||
| use bevy_animation::{AnimationClip, AnimationPlayer, EntityPath, Keyframes, VariableCurve}; | ||
| #[cfg(feature = "bevy_animation")] | ||
| use bevy_math::Quat; |
Member
There was a problem hiding this comment.
Can we move these imports into path_recur instead (maybe using absolute paths for the signature?)
Contributor
Author
There was a problem hiding this comment.
Done (the imports aren't used in path_recur, but in #[cfg]d blocks in load_gltf): 83d8e47
alice-i-cecile
approved these changes
May 10, 2022
Member
|
bors r+ |
bors Bot
pushed a commit
that referenced
this pull request
May 10, 2022
…t `animation` (#4714) # Objective When running `cargo check --no-default-features --features render` I get ```rust warning: unused import: `Quat` --> crates/bevy_gltf/src/loader.rs:11:23 | 11 | use bevy_math::{Mat4, Quat, Vec3}; | ^^^^ | = note: `#[warn(unused_imports)]` on by default warning: function is never used: `paths_recur` --> crates/bevy_gltf/src/loader.rs:542:4 | 542 | fn paths_recur( | ^^^^^^^^^^^ | = note: `#[warn(dead_code)]` on by default ``` ## Solution Put these items behind `#[cfg(feature = "animation")]`.
render feature but without animationrender feature but without animation
robtfm
pushed a commit
to robtfm/bevy
that referenced
this pull request
May 17, 2022
…t `animation` (bevyengine#4714) # Objective When running `cargo check --no-default-features --features render` I get ```rust warning: unused import: `Quat` --> crates/bevy_gltf/src/loader.rs:11:23 | 11 | use bevy_math::{Mat4, Quat, Vec3}; | ^^^^ | = note: `#[warn(unused_imports)]` on by default warning: function is never used: `paths_recur` --> crates/bevy_gltf/src/loader.rs:542:4 | 542 | fn paths_recur( | ^^^^^^^^^^^ | = note: `#[warn(dead_code)]` on by default ``` ## Solution Put these items behind `#[cfg(feature = "animation")]`.
exjam
pushed a commit
to exjam/bevy
that referenced
this pull request
May 22, 2022
…t `animation` (bevyengine#4714) # Objective When running `cargo check --no-default-features --features render` I get ```rust warning: unused import: `Quat` --> crates/bevy_gltf/src/loader.rs:11:23 | 11 | use bevy_math::{Mat4, Quat, Vec3}; | ^^^^ | = note: `#[warn(unused_imports)]` on by default warning: function is never used: `paths_recur` --> crates/bevy_gltf/src/loader.rs:542:4 | 542 | fn paths_recur( | ^^^^^^^^^^^ | = note: `#[warn(dead_code)]` on by default ``` ## Solution Put these items behind `#[cfg(feature = "animation")]`.
ItsDoot
pushed a commit
to ItsDoot/bevy
that referenced
this pull request
Feb 1, 2023
…t `animation` (bevyengine#4714) # Objective When running `cargo check --no-default-features --features render` I get ```rust warning: unused import: `Quat` --> crates/bevy_gltf/src/loader.rs:11:23 | 11 | use bevy_math::{Mat4, Quat, Vec3}; | ^^^^ | = note: `#[warn(unused_imports)]` on by default warning: function is never used: `paths_recur` --> crates/bevy_gltf/src/loader.rs:542:4 | 542 | fn paths_recur( | ^^^^^^^^^^^ | = note: `#[warn(dead_code)]` on by default ``` ## Solution Put these items behind `#[cfg(feature = "animation")]`.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Objective
When running
cargo check --no-default-features --features renderI getSolution
Put these items behind
#[cfg(feature = "animation")].