Skip to content

Commit 1980ac8

Browse files
authored
Fix some warnings (#9724)
# Objective - Fix these warnings ```rust warning: unused doc comment --> /bevy/crates/bevy_pbr/src/light.rs:62:13 | 62 | /// Luminous power in lumens | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 63 | intensity: 800.0, // Roughly a 60W non-halogen incandescent bulb | ---------------- rustdoc does not generate documentation for expression fields | = help: use `//` for a plain comment = note: `#[warn(unused_doc_comments)]` on by default ``` ```rust warning: `&` without an explicit lifetime name cannot be used here --> /bevy/crates/bevy_asset/src/lib.rs:89:32 | 89 | const DEFAULT_FILE_SOURCE: &str = "assets"; | ^ | = 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 <rust-lang/rust#115010> = note: `#[warn(elided_lifetimes_in_associated_constant)]` on by default help: use the `'static` lifetime | 89 | const DEFAULT_FILE_SOURCE: &'static str = "assets"; | ```
1 parent 8eb6ccd commit 1980ac8

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

crates/bevy_asset/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,10 @@ impl Default for AssetPlugin {
8686
}
8787

8888
impl AssetPlugin {
89-
const DEFAULT_FILE_SOURCE: &str = "assets";
89+
const DEFAULT_FILE_SOURCE: &'static str = "assets";
9090
/// NOTE: this is in the Default sub-folder to make this forward compatible with "import profiles"
9191
/// and to allow us to put the "processor transaction log" at `imported_assets/log`
92-
const DEFAULT_FILE_DESTINATION: &str = "imported_assets/Default";
92+
const DEFAULT_FILE_DESTINATION: &'static str = "imported_assets/Default";
9393

9494
/// Returns the default [`AssetPlugin::Processed`] configuration
9595
pub fn processed() -> Self {

crates/bevy_pbr/src/light.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ use crate::{
4444
#[reflect(Component, Default)]
4545
pub struct PointLight {
4646
pub color: Color,
47+
/// Luminous power in lumens
4748
pub intensity: f32,
4849
pub range: f32,
4950
pub radius: f32,
@@ -59,7 +60,6 @@ impl Default for PointLight {
5960
fn default() -> Self {
6061
PointLight {
6162
color: Color::rgb(1.0, 1.0, 1.0),
62-
/// Luminous power in lumens
6363
intensity: 800.0, // Roughly a 60W non-halogen incandescent bulb
6464
range: 20.0,
6565
radius: 0.0,
@@ -95,6 +95,7 @@ impl Default for PointLightShadowMap {
9595
#[reflect(Component, Default)]
9696
pub struct SpotLight {
9797
pub color: Color,
98+
/// Luminous power in lumens
9899
pub intensity: f32,
99100
pub range: f32,
100101
pub radius: f32,
@@ -127,7 +128,6 @@ impl Default for SpotLight {
127128
// a quarter arc attenuating from the center
128129
Self {
129130
color: Color::rgb(1.0, 1.0, 1.0),
130-
/// Luminous power in lumens
131131
intensity: 800.0, // Roughly a 60W non-halogen incandescent bulb
132132
range: 20.0,
133133
radius: 0.0,

0 commit comments

Comments
 (0)