Skip to content
GitHub Actions / Clippy Output succeeded Mar 31, 2024 in 0s

Clippy Output

17 warnings

Details

Results

Message level Amount
Internal compiler error 0
Error 0
Warning 17
Note 0
Help 0

Versions

  • rustc 1.77.1 (7cf61ebde 2024-03-27)
  • cargo 1.77.1 (e52e36006 2024-03-26)
  • clippy 0.1.77 (7cf61eb 2024-03-27)

Annotations

Check warning on line 59 in src/main.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy Output

variable does not need to be mutable

warning: variable does not need to be mutable
  --> src/main.rs:59:5
   |
59 |     mut materials: ResMut<Assets<StandardMaterial>>,
   |     ----^^^^^^^^^
   |     |
   |     help: remove this `mut`

Check warning on line 58 in src/main.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy Output

variable does not need to be mutable

warning: variable does not need to be mutable
  --> src/main.rs:58:5
   |
58 |     mut images: ResMut<Assets<Image>>,
   |     ----^^^^^^
   |     |
   |     help: remove this `mut`

Check warning on line 57 in src/main.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy Output

variable does not need to be mutable

warning: variable does not need to be mutable
  --> src/main.rs:57:5
   |
57 |     mut meshes: ResMut<Assets<Mesh>>,
   |     ----^^^^^^
   |     |
   |     help: remove this `mut`

Check warning on line 55 in src/main.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy Output

variable does not need to be mutable

warning: variable does not need to be mutable
  --> src/main.rs:55:5
   |
55 |     mut commands: Commands,
   |     ----^^^^^^^^
   |     |
   |     help: remove this `mut`
   |
   = note: `#[warn(unused_mut)]` on by default

Check warning on line 59 in src/main.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy Output

unused variable: `materials`

warning: unused variable: `materials`
  --> src/main.rs:59:9
   |
59 |     mut materials: ResMut<Assets<StandardMaterial>>,
   |         ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_materials`

Check warning on line 58 in src/main.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy Output

unused variable: `images`

warning: unused variable: `images`
  --> src/main.rs:58:9
   |
58 |     mut images: ResMut<Assets<Image>>,
   |         ^^^^^^ help: if this is intentional, prefix it with an underscore: `_images`

Check warning on line 57 in src/main.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy Output

unused variable: `meshes`

warning: unused variable: `meshes`
  --> src/main.rs:57:9
   |
57 |     mut meshes: ResMut<Assets<Mesh>>,
   |         ^^^^^^ help: if this is intentional, prefix it with an underscore: `_meshes`

Check warning on line 55 in src/main.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy Output

unused variable: `commands`

warning: unused variable: `commands`
  --> src/main.rs:55:9
   |
55 |     mut commands: Commands,
   |         ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_commands`
   |
   = note: `#[warn(unused_variables)]` on by default

Check warning on line 54 in src/bin/convert_to_png.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy Output

use of `expect` followed by a function call

warning: use of `expect` followed by a function call
  --> src/bin/convert_to_png.rs:54:14
   |
54 |             .expect(format!("Couldnt create png file {:?}", pngname).as_ref());
   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("Couldnt create png file {:?}", pngname))`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call

Check warning on line 93 in src/main.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy Output

unreachable statement

warning: unreachable statement
  --> src/main.rs:92:5
   |
89 |       return;
   |       ------ any code following this expression is unreachable
...
92 | /     let models =
93 | |         Model::load_many("assets/DecodedData/DATA/MODELS/NETCITYA.DAT").expect("Load models");
   | |______________________________________________________________________________________________^ unreachable statement
   |
   = note: `#[warn(unreachable_code)]` on by default

Check warning on line 43 in src/bin/convert_to_png.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy Output

use of `expect` followed by a function call

warning: use of `expect` followed by a function call
  --> src/bin/convert_to_png.rs:43:10
   |
43 |         .expect(format!("Couldnt open pix file {:?}", fname).as_ref());
   |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("Couldnt open pix file {:?}", fname))`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call
   = note: `#[warn(clippy::expect_fun_call)]` on by default

Check warning on line 146 in src/support/brender/model.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy Output

field assignment outside of initializer for an instance created with Default::default()

warning: field assignment outside of initializer for an instance created with Default::default()
   --> src/support/brender/model.rs:146:21
    |
146 |                     model.name = model_chunk.identifier;
    |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
note: consider initializing the variable with `support::brender::model::Model { name: model_chunk.identifier, ..Default::default() }` and removing relevant reassignments
   --> src/support/brender/model.rs:145:21
    |
145 |                     let mut model = Model::default();
    |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default

Check warning on line 69 in src/support/brender/model.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy Output

called `map(..).flatten()` on `Iterator`

warning: called `map(..).flatten()` on `Iterator`
  --> src/support/brender/model.rs:68:18
   |
68 |                   .map(|f| [f.v1, f.v2, f.v3])
   |  __________________^
69 | |                 .flatten()
   | |__________________________^ help: try replacing `map` with `flat_map` and remove the `.flatten()`: `flat_map(|f| [f.v1, f.v2, f.v3])`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten
   = note: `#[warn(clippy::map_flatten)]` on by default

Check warning on line 173 in src/support/brender/material.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy Output

field assignment outside of initializer for an instance created with Default::default()

warning: field assignment outside of initializer for an instance created with Default::default()
   --> src/support/brender/material.rs:173:21
    |
173 |                     mat.material = material;
    |                     ^^^^^^^^^^^^^^^^^^^^^^^^
    |
note: consider initializing the variable with `support::brender::material::Material { material: material, ..Default::default() }` and removing relevant reassignments
   --> src/support/brender/material.rs:172:21
    |
172 |                     let mut mat = Material::default();
    |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default
    = note: `#[warn(clippy::field_reassign_with_default)]` on by default

Check warning on line 106 in src/support/brender/actor.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy Output

`Box::new(_)` of default value

warning: `Box::new(_)` of default value
   --> src/support/brender/actor.rs:106:35
    |
106 |                     actor.model = Box::new(Model::default()); //Models::find(model.identifier); // World::query<Model>?
    |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Box::<Model>::default()`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#box_default
    = note: `#[warn(clippy::box_default)]` on by default

Check warning on line 190 in src/support/brender/actor.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy Output

returning the result of a `let` binding from a block

warning: returning the result of a `let` binding from a block
   --> src/support/brender/actor.rs:190:9
    |
189 |         let actor = stack.pop::<Actor>()?;
    |         ---------------------------------- unnecessary `let` binding
190 |         actor
    |         ^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return
    = note: `#[warn(clippy::let_and_return)]` on by default
help: return the expression directly
    |
189 ~         
190 ~         stack.pop::<Actor>()?
    |

Check warning on line 66 in src/support/brender/actor.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy Output

`Vec<T>` is already on the heap, the boxing is unnecessary

warning: `Vec<T>` is already on the heap, the boxing is unnecessary
  --> src/support/brender/actor.rs:66:15
   |
66 |     children: Vec<Box<Actor>>,
   |               ^^^^^^^^^^^^^^^ help: try: `Vec<Actor>`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_box
   = note: `#[warn(clippy::vec_box)]` on by default