mirror of
https://github.com/bevyengine/bevy
synced 2024-11-22 20:53:53 +00:00
7541bf862c
# Objective Fix warnings: - #[warn(clippy::needless_pass_by_ref_mut)] - #[warn(elided_lifetimes_in_associated_constant)] ## Solution - Remove mut - add &'static ## Errors ```rust warning: this argument is a mutable reference, but not used mutably --> crates/bevy_hierarchy/src/child_builder.rs:672:31 | 672 | fn assert_children(world: &mut World, parent: Entity, children: Option<&[Entity]>) { | ^^^^^^^^^^ help: consider changing to: `&World` | = note: this is cfg-gated and may require further changes = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut = note: `#[warn(clippy::needless_pass_by_ref_mut)]` on by default ``` ```rust warning: `&` without an explicit lifetime name cannot be used here --> examples/shader/post_processing.rs:120:21 | 120 | pub const NAME: &str = "post_process"; | ^ | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #115010 <https://github.com/rust-lang/rust/issues/115010> = note: `#[warn(elided_lifetimes_in_associated_constant)]` on by default help: use the `'static` lifetime | 120 | pub const NAME: &'static str = "post_process"; | +++++++ ``` |
||
---|---|---|
.. | ||
animate_shader.rs | ||
array_texture.rs | ||
compute_shader_game_of_life.rs | ||
custom_vertex_attribute.rs | ||
fallback_image.rs | ||
post_processing.rs | ||
shader_defs.rs | ||
shader_instancing.rs | ||
shader_material.rs | ||
shader_material_glsl.rs | ||
shader_material_screenspace_texture.rs | ||
shader_prepass.rs | ||
texture_binding_array.rs |