feat: Build and test on CI #2
Annotations
1 error and 65 warnings
Rustfmt
The process '/home/runner/.cargo/bin/cargo' failed with exit code 1
|
Rustfmt
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v2, actions-rs/toolchain@v1, actions-rs/cargo@v1. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
Rustfmt
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, actions-rs/toolchain@v1, actions-rs/cargo@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
Rustfmt
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Rustfmt
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Rustfmt
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Rustfmt
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Check
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v2, actions-rs/toolchain@v1, actions-rs/cargo@v1. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
Check
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, actions-rs/toolchain@v1, actions-rs/cargo@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
Check
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Check
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Check
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Check
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
unneeded `return` statement:
src/main.rs#L192
warning: unneeded `return` statement
--> src/main.rs:192:37
|
192 | Event::LoopDestroyed => return,
| ^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: replace `return` with a unit value
|
192 | Event::LoopDestroyed => (),
| ~~
|
casting integer literal to `u16` is unnecessary:
src/main.rs#L155
warning: casting integer literal to `u16` is unnecessary
--> src/main.rs:155:54
|
155 | let x = 1.0f32 * f32::from(counter % 7 as u16);
| ^^^^^^^^ help: try: `7_u16`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
= note: `#[warn(clippy::unnecessary_cast)]` on by default
|
unneeded `return` statement:
src/support/mod.rs#L153
warning: unneeded `return` statement
--> src/support/mod.rs:153:5
|
153 | return dir;
| ^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
= note: `#[warn(clippy::needless_return)]` on by default
help: remove `return`
|
153 - return dir;
153 + dir
|
|
this operation has no effect:
src/support/texture.rs#L149
warning: this operation has no effect
--> src/support/texture.rs:149:41
|
149 | data.push(self.data[(i * self.unit_bytes + 0) as usize]); // R
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `i * self.unit_bytes`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op
|
this operation has no effect:
src/support/texture.rs#L141
warning: this operation has no effect
--> src/support/texture.rs:141:41
|
141 | data.push(self.data[(i * self.unit_bytes + 0) as usize]); // R
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `i * self.unit_bytes`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op
|
this operation has no effect:
src/support/texture.rs#L93
warning: this operation has no effect
--> src/support/texture.rs:93:26
|
93 | [(self.data[i as usize] as u32 * palette.unit_bytes + 0) as usize],
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `self.data[i as usize] as u32 * palette.unit_bytes`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op
|
this operation has no effect:
src/support/resource.rs#L264
warning: this operation has no effect
--> src/support/resource.rs:264:32
|
264 | params[row * 3 + 0],
| ^^^^^^^^^^^ help: consider reducing it to: `row * 3`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op
|
the loop variable `i` is only used to index `params`:
src/support/resource.rs#L258
warning: the loop variable `i` is only used to index `params`
--> src/support/resource.rs:258:26
|
258 | for i in 0..12 {
| ^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop
help: consider using an iterator
|
258 | for <item> in &mut params {
| ~~~~~~ ~~~~~~~~~~~
|
the loop variable `i` is only used to index `params`:
src/support/resource.rs#L145
warning: the loop variable `i` is only used to index `params`
--> src/support/resource.rs:145:26
|
145 | for i in 0..12 {
| ^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop
help: consider using an iterator
|
145 | for <item> in &mut params {
| ~~~~~~ ~~~~~~~~~~~
|
field assignment outside of initializer for an instance created with Default::default():
src/support/resource.rs#L30
warning: field assignment outside of initializer for an instance created with Default::default()
--> src/support/resource.rs:30:9
|
30 | h.chunk_type = source.read_u32::<BigEndian>()?;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: consider initializing the variable with `support::resource::ChunkHeader { chunk_type: source.read_u32::<BigEndian>()?, size: source.read_u32::<BigEndian>()? }` and removing relevant reassignments
--> src/support/resource.rs:29:9
|
29 | let mut h = ChunkHeader::default();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default
|
using `clone` on type `Matrix4<f32>` which implements the `Copy` trait:
src/support/render_manager.rs#L253
warning: using `clone` on type `Matrix4<f32>` which implements the `Copy` trait
--> src/support/render_manager.rs:253:36
|
253 | let model: [[f32; 4]; 4] = model.clone().into();
| ^^^^^^^^^^^^^ help: try dereferencing it: `(*model)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
= note: `#[warn(clippy::clone_on_copy)]` on by default
|
this expression creates a reference which is immediately dereferenced by the compiler:
src/support/render_manager.rs#L203
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> src/support/render_manager.rs:203:47
|
203 | self.draw_actor(name, &transform_stack.last().unwrap(), target, camera);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `transform_stack.last().unwrap()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
dereferencing a tuple pattern where every element takes a reference:
src/support/render_manager.rs#L199
warning: dereferencing a tuple pattern where every element takes a reference
--> src/support/render_manager.rs:199:17
|
199 | &ActorNode::MeshfileRef(ref name) => {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference
help: try removing the `&` and `ref` parts
|
199 - &ActorNode::MeshfileRef(ref name) => {
199 + ActorNode::MeshfileRef(name) => {
|
|
you don't need to add `&` to all patterns:
src/support/render_manager.rs#L182
warning: you don't need to add `&` to all patterns
--> src/support/render_manager.rs:182:13
|
182 | / match actor.data() {
183 | | &ActorNode::Actor { ref name, visible } => {
184 | | actor_name = name.clone();
185 | | v = visible;
... |
222 | | _ => (),
223 | | }
| |_____________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats
= note: `#[warn(clippy::match_ref_pats)]` on by default
help: instead of prefixing all patterns with `&`, you can dereference the expression
|
182 ~ match *actor.data() {
183 ~ ActorNode::Actor { ref name, visible } => {
184 | actor_name = name.clone();
...
198 | }
199 ~ ActorNode::MeshfileRef(ref name) => {
200 | debug_tree(&format!("Mesh {}", name), &actor_name, &transform_stack);
...
205 | }
206 ~ ActorNode::Transform(t) => {
|
|
this expression creates a reference which is immediately dereferenced by the compiler:
src/support/render_manager.rs#L160
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> src/support/render_manager.rs:160:81
|
160 | IndexBuffer::new(display, PrimitiveType::TrianglesList, &item).unwrap(),
| ^^^^^ help: change this to: `item`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
use of `or_insert` to construct default value:
src/support/render_manager.rs#L138
warning: use of `or_insert` to construct default value
--> src/support/render_manager.rs:138:18
|
138 | .or_insert(Vec::new());
| ^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default
|
dereferencing a tuple pattern where every element takes a reference:
src/support/render_manager.rs#L115
warning: dereferencing a tuple pattern where every element takes a reference
--> src/support/render_manager.rs:115:17
|
115 | &ActorNode::MeshfileRef(ref name) => {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference
help: try removing the `&` and `ref` parts
|
115 - &ActorNode::MeshfileRef(ref name) => {
115 + ActorNode::MeshfileRef(name) => {
|
|
you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let`:
src/support/render_manager.rs#L114
warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let`
--> src/support/render_manager.rs:114:13
|
114 | / match actor.data() {
115 | | &ActorNode::MeshfileRef(ref name) => {
116 | | debug!("Actor meshfile {}", name);
117 | | self.prepare_car_actor(name, car, display);
118 | | }
119 | | _ => (),
120 | | }
| |_____________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match
help: try
|
114 ~ if let &ActorNode::MeshfileRef(ref name) = actor.data() {
115 + debug!("Actor meshfile {}", name);
116 + self.prepare_car_actor(name, car, display);
117 + }
|
|
use of `or_insert` to construct default value:
src/support/render_manager.rs#L83
warning: use of `or_insert` to construct default value
--> src/support/render_manager.rs:83:18
|
83 | .or_insert(HashMap::new());
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default
= note: `#[warn(clippy::unwrap_or_default)]` on by default
|
you seem to want to iterate on a map's keys:
src/support/render_manager.rs#L79
warning: you seem to want to iterate on a map's keys
--> src/support/render_manager.rs:79:26
|
79 | for (&mat, _) in &self.indices[actor_name] {
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map
help: use the corresponding method
|
79 | for &mat in self.indices[actor_name].keys() {
| ~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
you seem to want to iterate on a map's keys:
src/support/render_manager.rs#L56
warning: you seem to want to iterate on a map's keys
--> src/support/render_manager.rs:56:33
|
56 | for (name, _indices) in &self.indices {
| ^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map
= note: `#[warn(clippy::for_kv_map)]` on by default
help: use the corresponding method
|
56 | for name in self.indices.keys() {
| ~~~~ ~~~~~~~~~~~~~~~~~~~
|
the loop variable `n` is used to index `uvcoords`:
src/support/mesh.rs#L108
warning: the loop variable `n` is used to index `uvcoords`
--> src/support/mesh.rs:108:18
|
108 | for n in 0..uvcoords.len() {
| ^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop
help: consider using an iterator and enumerate()
|
108 | for (n, <item>) in uvcoords.iter().enumerate() {
| ~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
the loop variable `i` is used to index `fmlist`:
src/support/mesh.rs#L103
warning: the loop variable `i` is used to index `fmlist`
--> src/support/mesh.rs:103:22
|
103 | for i in 0..m.faces.len() {
| ^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop
= note: `#[warn(clippy::needless_range_loop)]` on by default
help: consider using an iterator and enumerate()
|
103 | for (i, <item>) in fmlist.iter().enumerate().take(m.faces.len()) {
| ~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
length comparison to zero:
src/support/mesh.rs#L102
warning: length comparison to zero
--> src/support/mesh.rs:102:12
|
102 | if fmlist.len() > 0 && m.faces.len() == fmlist.len() {
| ^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!fmlist.is_empty()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero
= note: `#[warn(clippy::len_zero)]` on by default
|
field assignment outside of initializer for an instance created with Default::default():
src/support/mesh.rs#L45
warning: field assignment outside of initializer for an instance created with Default::default()
--> src/support/mesh.rs:45:9
|
45 | s.v1 = rdr.read_u16::<BigEndian>()?;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: consider initializing the variable with `support::mesh::Face { v1: rdr.read_u16::<BigEndian>()?, v2: rdr.read_u16::<BigEndian>()?, v3: rdr.read_u16::<BigEndian>()?, flags: rdr.read_u16::<BigEndian>()?, ..Default::default() }` and removing relevant reassignments
--> src/support/mesh.rs:44:9
|
44 | let mut s = Face::default();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default
|
field assignment outside of initializer for an instance created with Default::default():
src/support/mesh.rs#L27
warning: field assignment outside of initializer for an instance created with Default::default()
--> src/support/mesh.rs:27:9
|
27 | uv.u = rdr.read_f32::<BigEndian>()?;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: consider initializing the variable with `support::mesh::UvCoord { u: rdr.read_f32::<BigEndian>()?, v: rdr.read_f32::<BigEndian>()? }` and removing relevant reassignments
--> src/support/mesh.rs:26:9
|
26 | let mut uv = UvCoord::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
|
this expression creates a reference which is immediately dereferenced by the compiler:
src/support/car.rs#L607
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> src/support/car.rs:607:43
|
607 | let pmap = pmap.remap_via(&palette)?;
| ^^^^^^^^ help: change this to: `palette`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
src/support/car.rs#L597
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> src/support/car.rs:597:60
|
597 | let pix_file_name = path_subst(&pix_file_name, &Path::new("PIXELMAP"), None);
| ^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `Path::new("PIXELMAP")`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this operation has no effect:
src/support/car.rs#L586
warning: this operation has no effect
--> src/support/car.rs:586:30
|
586 | palette.data[(x * palette.unit_bytes + 0) as usize]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `x * palette.unit_bytes`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op
= note: `#[warn(clippy::identity_op)]` on by default
|
this expression creates a reference which is immediately dereferenced by the compiler:
src/support/car.rs#L578
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> src/support/car.rs:578:56
|
578 | let pal_file_name = path_subst(&pal_file_name, &Path::new("REG/PALETTES"), None);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `Path::new("REG/PALETTES")`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
you are using an explicit closure for cloning elements:
src/support/car.rs#L558
warning: you are using an explicit closure for cloning elements
--> src/support/car.rs:558:13
|
558 | load_materials.iter().map(|s| s.clone()).collect();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `cloned` method: `load_materials.iter().cloned()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone
= note: `#[warn(clippy::map_clone)]` on by default
|
dereferencing a tuple pattern where every element takes a reference:
src/support/car.rs#L542
warning: dereferencing a tuple pattern where every element takes a reference
--> src/support/car.rs:542:17
|
542 | &ActorNode::MeshfileRef(ref name) => {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference
= note: `#[warn(clippy::needless_borrowed_reference)]` on by default
help: try removing the `&` and `ref` parts
|
542 - &ActorNode::MeshfileRef(ref name) => {
542 + ActorNode::MeshfileRef(name) => {
|
|
you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let`:
src/support/car.rs#L541
warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let`
--> src/support/car.rs:541:13
|
541 | / match actor.data() {
542 | | &ActorNode::MeshfileRef(ref name) => {
543 | | if !car_meshes.contains_key(name) {
544 | | load_models.push(name.clone())
... |
547 | | _ => (),
548 | | }
| |_____________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match
= note: `#[warn(clippy::single_match)]` on by default
help: try
|
541 ~ if let &ActorNode::MeshfileRef(ref name) = actor.data() {
542 + if !car_meshes.contains_key(name) {
543 + load_models.push(name.clone())
544 + }
545 + }
|
|
this expression creates a reference which is immediately dereferenced by the compiler:
src/support/car.rs#L532
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> src/support/car.rs:532:13
|
532 | &Path::new("ACTORS"),
| ^^^^^^^^^^^^^^^^^^^^ help: change this to: `Path::new("ACTORS")`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
called `skip(..).next()` on an iterator:
src/support/car.rs#L495
warning: called `skip(..).next()` on an iterator
--> src/support/car.rs:495:32
|
495 | .split(" version ")
| ________________________________^
496 | | .skip(1)
497 | | .next()
| |___________________^ help: use `nth` instead: `.nth(1)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_skip_next
= note: `#[warn(clippy::iter_skip_next)]` on by default
|
single-character string constant used as pattern:
src/support/car.rs#L426
warning: single-character string constant used as pattern
--> src/support/car.rs:426:34
|
426 | .map(|act| act.split(","))
| ^^^ help: try using a `char` instead: `','`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern
= note: `#[warn(clippy::single_char_pattern)]` on by default
|
this expression creates a reference which is immediately dereferenced by the compiler:
src/support/car.rs#L345
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> src/support/car.rs:345:13
|
345 | &Path::new("CARS"),
| ^^^^^^^^^^^^^^^^^^ help: change this to: `Path::new("CARS")`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
src/support/car.rs#L344
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> src/support/car.rs:344:13
|
344 | &Path::new(fname.as_str()),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `Path::new(fname.as_str())`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
src/support/car.rs#L303
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> src/support/car.rs:303:56
|
303 | let mat_file_name = path_subst(&mat_file_name, &Path::new("MATERIAL"), None);
| ^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `Path::new("MATERIAL")`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
src/support/car.rs#L277
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> src/support/car.rs:277:13
|
277 | &Path::new("MODELS"),
| ^^^^^^^^^^^^^^^^^^^^ help: change this to: `Path::new("MODELS")`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
= note: `#[warn(clippy::needless_borrow)]` on by default
|
writing `&Vec` instead of `&[_]` involves a new object where a slice will do:
src/support/car.rs#L263
warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do
--> src/support/car.rs:263:18
|
263 | load_models: &Vec<String>,
| ^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg
help: change this to
|
263 ~ load_models: &[String],
264 | car_meshes: &mut HashMap<String, Mesh>,
265 | ) -> Result<(), Error> {
266 ~ let mut load_models = load_models.to_owned();
|
|
writing `&String` instead of `&str` involves a new object where a slice will do:
src/support/car.rs#L49
warning: writing `&String` instead of `&str` involves a new object where a slice will do
--> src/support/car.rs:49:23
|
49 | fn parse_vector(line: &String) -> Vector3<f32> {
| ^^^^^^^ help: change this to: `&str`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg
= note: `#[warn(clippy::ptr_arg)]` on by default
|
you should consider adding a `Default` implementation for `CameraState`:
src/support/camera.rs#L30
warning: you should consider adding a `Default` implementation for `CameraState`
--> src/support/camera.rs:30:5
|
30 | / pub fn new() -> CameraState {
31 | | CameraState {
32 | | // Keep ratio fixed at 4/3
33 | | aspect_ratio: 4.0 / 3.0,
... |
55 | | }
56 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
= note: `#[warn(clippy::new_without_default)]` on by default
help: try adding this
|
29 + impl Default for CameraState {
30 + fn default() -> Self {
31 + Self::new()
32 + }
33 + }
|
|
variable does not need to be mutable:
src/main.rs#L170
warning: variable does not need to be mutable
--> src/main.rs:170:9
|
170 | let mut events_loop = glium::glutin::event_loop::EventLoop::new();
| ----^^^^^^^^^^^
| |
| help: remove this `mut`
|
= note: `#[warn(unused_mut)]` on by default
|
redundant field names in struct initialization:
src/support/actor.rs#L51
warning: redundant field names in struct initialization
--> src/support/actor.rs:51:13
|
51 | root_id: root_id,
| ^^^^^^^^^^^^^^^^ help: replace it with: `root_id`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
|
redundant field names in struct initialization:
src/support/actor.rs#L50
warning: redundant field names in struct initialization
--> src/support/actor.rs:50:13
|
50 | tree: tree,
| ^^^^^^^^^^ help: replace it with: `tree`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
= note: `#[warn(clippy::redundant_field_names)]` on by default
|
`cfg_attr` is deprecated for rustfmt and got replaced by tool attributes:
src/support/mesh.rs#L167
warning: `cfg_attr` is deprecated for rustfmt and got replaced by tool attributes
--> src/support/mesh.rs:167:5
|
167 | #[cfg_attr(rustfmt, rustfmt_skip)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `#[rustfmt::skip]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_cfg_attr
= note: `#[warn(clippy::deprecated_cfg_attr)]` on by default
|
Clippy
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v2, actions-rs/toolchain@v1, actions-rs/clippy-check@v1. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
Clippy
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, actions-rs/toolchain@v1, actions-rs/clippy-check@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
Clippy
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Clippy
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Clippy
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Clippy
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|