Removed old ComponentPool trait #8
development.yml
on: push
Annotations
166 warnings
unused variable: `no_clear`:
codegen/src/clear.rs#L102
warning: unused variable: `no_clear`
--> codegen/src/clear.rs:102:13
|
102 | let no_clear = v.attrs.iter().any(|v| {
| ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_no_clear`
|
= note: `#[warn(unused_variables)]` on by default
|
unused variable: `no_clear`:
codegen/src/clear.rs#L124
warning: unused variable: `no_clear`
--> codegen/src/clear.rs:124:13
|
124 | let no_clear = f.attrs.iter().any(|v| {
| ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_no_clear`
|
method `to_index` is never used:
codegen/src/dispatch.rs#L55
warning: method `to_index` is never used
--> codegen/src/dispatch.rs:55:12
|
40 | impl FieldName {
| -------------- method in this implementation
...
55 | pub fn to_index(&self) -> usize {
| ^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
|
unused variable: `no_clear`:
codegen/src/clear.rs#L102
warning: unused variable: `no_clear`
--> codegen/src/clear.rs:102:13
|
102 | let no_clear = v.attrs.iter().any(|v| {
| ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_no_clear`
|
= note: `#[warn(unused_variables)]` on by default
|
unused variable: `no_clear`:
codegen/src/clear.rs#L124
warning: unused variable: `no_clear`
--> codegen/src/clear.rs:124:13
|
124 | let no_clear = f.attrs.iter().any(|v| {
| ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_no_clear`
|
method `to_index` is never used:
codegen/src/dispatch.rs#L55
warning: method `to_index` is never used
--> codegen/src/dispatch.rs:55:12
|
40 | impl FieldName {
| -------------- method in this implementation
...
55 | pub fn to_index(&self) -> usize {
| ^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
|
unused import: `Context as _`:
testprog/src/main.rs#L33
warning: unused import: `Context as _`
--> testprog/src/main.rs:33:29
|
33 | use regecs::object::{Class, Context as _, Object, ObjectRef};
| ^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
|
unnecessary parentheses around type:
testprog/src/main.rs#L209
warning: unnecessary parentheses around type
--> testprog/src/main.rs:209:22
|
209 | type Arguments = (i32);
| ^ ^
|
= note: `#[warn(unused_parens)]` on by default
help: remove these parentheses
|
209 - type Arguments = (i32);
209 + type Arguments = i32;
|
|
unused import: `regecs_codegen::New`:
testprog/src/main.rs#L216
warning: unused import: `regecs_codegen::New`
--> testprog/src/main.rs:216:5
|
216 | use regecs_codegen::New;
| ^^^^^^^^^^^^^^^^^^^
|
unused import: `regecs_codegen::Object`:
testprog/src/main.rs#L217
warning: unused import: `regecs_codegen::Object`
--> testprog/src/main.rs:217:5
|
217 | use regecs_codegen::Object;
| ^^^^^^^^^^^^^^^^^^^^^^
|
unused import: `regecs::component::list::List`:
testprog/src/main.rs#L30
warning: unused import: `regecs::component::list::List`
--> testprog/src/main.rs:30:5
|
30 | use regecs::component::list::List;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
unused import: `Context`:
testprog/src/main.rs#L35
warning: unused import: `Context`
--> testprog/src/main.rs:35:22
|
35 | use regecs::system::{Context as _, Update};
| ^^^^^^^
|
unused variable: `ctx`:
testprog/src/main.rs#L195
warning: unused variable: `ctx`
--> testprog/src/main.rs:195:28
|
195 | fn on_event(&mut self, ctx: &mut Ctx1, state: &i32, event: &Event<()>) {
| ^^^ help: if this is intentional, prefix it with an underscore: `_ctx`
|
= note: `#[warn(unused_variables)]` on by default
|
unused variable: `state`:
testprog/src/main.rs#L195
warning: unused variable: `state`
--> testprog/src/main.rs:195:44
|
195 | fn on_event(&mut self, ctx: &mut Ctx1, state: &i32, event: &Event<()>) {
| ^^^^^ help: if this is intentional, prefix it with an underscore: `_state`
|
unused variable: `event`:
testprog/src/main.rs#L195
warning: unused variable: `event`
--> testprog/src/main.rs:195:57
|
195 | fn on_event(&mut self, ctx: &mut Ctx1, state: &i32, event: &Event<()>) {
| ^^^^^ help: if this is intentional, prefix it with an underscore: `_event`
|
unused variable: `ctx`:
testprog/src/main.rs#L199
warning: unused variable: `ctx`
--> testprog/src/main.rs:199:29
|
199 | fn on_remove(&mut self, ctx: &mut Ctx1, state: &i32) {
| ^^^ help: if this is intentional, prefix it with an underscore: `_ctx`
|
unused variable: `state`:
testprog/src/main.rs#L199
warning: unused variable: `state`
--> testprog/src/main.rs:199:45
|
199 | fn on_remove(&mut self, ctx: &mut Ctx1, state: &i32) {
| ^^^^^ help: if this is intentional, prefix it with an underscore: `_state`
|
unused variable: `ctx`:
testprog/src/main.rs#L203
warning: unused variable: `ctx`
--> testprog/src/main.rs:203:29
|
203 | fn on_update(&mut self, ctx: &mut Ctx1, state: &i32) {
| ^^^ help: if this is intentional, prefix it with an underscore: `_ctx`
|
unused variable: `state`:
testprog/src/main.rs#L203
warning: unused variable: `state`
--> testprog/src/main.rs:203:45
|
203 | fn on_update(&mut self, ctx: &mut Ctx1, state: &i32) {
| ^^^^^ help: if this is intentional, prefix it with an underscore: `_state`
|
unused variable: `ctx`:
testprog/src/main.rs#L228
warning: unused variable: `ctx`
--> testprog/src/main.rs:228:28
|
228 | fn on_event(&mut self, ctx: &mut Ctx1, state: &i32, event: &Event<()>) {
| ^^^ help: if this is intentional, prefix it with an underscore: `_ctx`
|
unused variable: `state`:
testprog/src/main.rs#L228
warning: unused variable: `state`
--> testprog/src/main.rs:228:44
|
228 | fn on_event(&mut self, ctx: &mut Ctx1, state: &i32, event: &Event<()>) {
| ^^^^^ help: if this is intentional, prefix it with an underscore: `_state`
|
unused variable: `event`:
testprog/src/main.rs#L228
warning: unused variable: `event`
--> testprog/src/main.rs:228:57
|
228 | fn on_event(&mut self, ctx: &mut Ctx1, state: &i32, event: &Event<()>) {
| ^^^^^ help: if this is intentional, prefix it with an underscore: `_event`
|
unused variable: `ctx`:
testprog/src/main.rs#L232
warning: unused variable: `ctx`
--> testprog/src/main.rs:232:29
|
232 | fn on_remove(&mut self, ctx: &mut Ctx1, state: &i32) {
| ^^^ help: if this is intentional, prefix it with an underscore: `_ctx`
|
unused variable: `state`:
testprog/src/main.rs#L232
warning: unused variable: `state`
--> testprog/src/main.rs:232:45
|
232 | fn on_remove(&mut self, ctx: &mut Ctx1, state: &i32) {
| ^^^^^ help: if this is intentional, prefix it with an underscore: `_state`
|
unused variable: `ctx`:
testprog/src/main.rs#L236
warning: unused variable: `ctx`
--> testprog/src/main.rs:236:29
|
236 | fn on_update(&mut self, ctx: &mut Ctx1, state: &i32) {
| ^^^ help: if this is intentional, prefix it with an underscore: `_ctx`
|
unused variable: `state`:
testprog/src/main.rs#L236
warning: unused variable: `state`
--> testprog/src/main.rs:236:45
|
236 | fn on_update(&mut self, ctx: &mut Ctx1, state: &i32) {
| ^^^^^ help: if this is intentional, prefix it with an underscore: `_state`
|
field `my2` is never read:
testprog/src/main.rs#L183
warning: field `my2` is never read
--> testprog/src/main.rs:183:5
|
180 | pub struct TestSystemManager {
| ----------------- field in this struct
...
183 | my2: MySystem2,
| ^^^
|
= note: `#[warn(dead_code)]` on by default
|
Build & Test (ubuntu-20.04)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3, bp3d-actions/cargo@main. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
unused variable: `no_clear`:
codegen/src/clear.rs#L102
warning: unused variable: `no_clear`
--> codegen/src/clear.rs:102:13
|
102 | let no_clear = v.attrs.iter().any(|v| {
| ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_no_clear`
|
= note: `#[warn(unused_variables)]` on by default
|
unused variable: `no_clear`:
codegen/src/clear.rs#L124
warning: unused variable: `no_clear`
--> codegen/src/clear.rs:124:13
|
124 | let no_clear = f.attrs.iter().any(|v| {
| ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_no_clear`
|
unused variable: `no_clear`:
codegen/src/clear.rs#L102
warning: unused variable: `no_clear`
--> codegen/src/clear.rs:102:13
|
102 | let no_clear = v.attrs.iter().any(|v| {
| ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_no_clear`
|
= note: `#[warn(unused_variables)]` on by default
|
unused variable: `no_clear`:
codegen/src/clear.rs#L124
warning: unused variable: `no_clear`
--> codegen/src/clear.rs:124:13
|
124 | let no_clear = f.attrs.iter().any(|v| {
| ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_no_clear`
|
method `to_index` is never used:
codegen/src/dispatch.rs#L55
warning: method `to_index` is never used
--> codegen/src/dispatch.rs:55:12
|
40 | impl FieldName {
| -------------- method in this implementation
...
55 | pub fn to_index(&self) -> usize {
| ^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
|
method `to_index` is never used:
codegen/src/dispatch.rs#L55
warning: method `to_index` is never used
--> codegen/src/dispatch.rs:55:12
|
40 | impl FieldName {
| -------------- method in this implementation
...
55 | pub fn to_index(&self) -> usize {
| ^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
|
unused import: `Context as _`:
testprog/src/main.rs#L33
warning: unused import: `Context as _`
--> testprog/src/main.rs:33:29
|
33 | use regecs::object::{Class, Context as _, Object, ObjectRef};
| ^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
|
unnecessary parentheses around type:
testprog/src/main.rs#L209
warning: unnecessary parentheses around type
--> testprog/src/main.rs:209:22
|
209 | type Arguments = (i32);
| ^ ^
|
= note: `#[warn(unused_parens)]` on by default
help: remove these parentheses
|
209 - type Arguments = (i32);
209 + type Arguments = i32;
|
|
unused import: `regecs_codegen::New`:
testprog/src/main.rs#L216
warning: unused import: `regecs_codegen::New`
--> testprog/src/main.rs:216:5
|
216 | use regecs_codegen::New;
| ^^^^^^^^^^^^^^^^^^^
|
unused import: `regecs_codegen::Object`:
testprog/src/main.rs#L217
warning: unused import: `regecs_codegen::Object`
--> testprog/src/main.rs:217:5
|
217 | use regecs_codegen::Object;
| ^^^^^^^^^^^^^^^^^^^^^^
|
unused import: `regecs::component::list::List`:
testprog/src/main.rs#L30
warning: unused import: `regecs::component::list::List`
--> testprog/src/main.rs:30:5
|
30 | use regecs::component::list::List;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
unused import: `Context`:
testprog/src/main.rs#L35
warning: unused import: `Context`
--> testprog/src/main.rs:35:22
|
35 | use regecs::system::{Context as _, Update};
| ^^^^^^^
|
unused variable: `ctx`:
testprog/src/main.rs#L195
warning: unused variable: `ctx`
--> testprog/src/main.rs:195:28
|
195 | fn on_event(&mut self, ctx: &mut Ctx1, state: &i32, event: &Event<()>) {
| ^^^ help: if this is intentional, prefix it with an underscore: `_ctx`
|
= note: `#[warn(unused_variables)]` on by default
|
unused variable: `state`:
testprog/src/main.rs#L195
warning: unused variable: `state`
--> testprog/src/main.rs:195:44
|
195 | fn on_event(&mut self, ctx: &mut Ctx1, state: &i32, event: &Event<()>) {
| ^^^^^ help: if this is intentional, prefix it with an underscore: `_state`
|
unused variable: `event`:
testprog/src/main.rs#L195
warning: unused variable: `event`
--> testprog/src/main.rs:195:57
|
195 | fn on_event(&mut self, ctx: &mut Ctx1, state: &i32, event: &Event<()>) {
| ^^^^^ help: if this is intentional, prefix it with an underscore: `_event`
|
unused variable: `ctx`:
testprog/src/main.rs#L199
warning: unused variable: `ctx`
--> testprog/src/main.rs:199:29
|
199 | fn on_remove(&mut self, ctx: &mut Ctx1, state: &i32) {
| ^^^ help: if this is intentional, prefix it with an underscore: `_ctx`
|
unused variable: `state`:
testprog/src/main.rs#L199
warning: unused variable: `state`
--> testprog/src/main.rs:199:45
|
199 | fn on_remove(&mut self, ctx: &mut Ctx1, state: &i32) {
| ^^^^^ help: if this is intentional, prefix it with an underscore: `_state`
|
unused variable: `ctx`:
testprog/src/main.rs#L203
warning: unused variable: `ctx`
--> testprog/src/main.rs:203:29
|
203 | fn on_update(&mut self, ctx: &mut Ctx1, state: &i32) {
| ^^^ help: if this is intentional, prefix it with an underscore: `_ctx`
|
unused variable: `state`:
testprog/src/main.rs#L203
warning: unused variable: `state`
--> testprog/src/main.rs:203:45
|
203 | fn on_update(&mut self, ctx: &mut Ctx1, state: &i32) {
| ^^^^^ help: if this is intentional, prefix it with an underscore: `_state`
|
unused variable: `ctx`:
testprog/src/main.rs#L228
warning: unused variable: `ctx`
--> testprog/src/main.rs:228:28
|
228 | fn on_event(&mut self, ctx: &mut Ctx1, state: &i32, event: &Event<()>) {
| ^^^ help: if this is intentional, prefix it with an underscore: `_ctx`
|
unused variable: `state`:
testprog/src/main.rs#L228
warning: unused variable: `state`
--> testprog/src/main.rs:228:44
|
228 | fn on_event(&mut self, ctx: &mut Ctx1, state: &i32, event: &Event<()>) {
| ^^^^^ help: if this is intentional, prefix it with an underscore: `_state`
|
unused variable: `event`:
testprog/src/main.rs#L228
warning: unused variable: `event`
--> testprog/src/main.rs:228:57
|
228 | fn on_event(&mut self, ctx: &mut Ctx1, state: &i32, event: &Event<()>) {
| ^^^^^ help: if this is intentional, prefix it with an underscore: `_event`
|
unused variable: `ctx`:
testprog/src/main.rs#L232
warning: unused variable: `ctx`
--> testprog/src/main.rs:232:29
|
232 | fn on_remove(&mut self, ctx: &mut Ctx1, state: &i32) {
| ^^^ help: if this is intentional, prefix it with an underscore: `_ctx`
|
unused variable: `state`:
testprog/src/main.rs#L232
warning: unused variable: `state`
--> testprog/src/main.rs:232:45
|
232 | fn on_remove(&mut self, ctx: &mut Ctx1, state: &i32) {
| ^^^^^ help: if this is intentional, prefix it with an underscore: `_state`
|
unused variable: `ctx`:
testprog/src/main.rs#L236
warning: unused variable: `ctx`
--> testprog/src/main.rs:236:29
|
236 | fn on_update(&mut self, ctx: &mut Ctx1, state: &i32) {
| ^^^ help: if this is intentional, prefix it with an underscore: `_ctx`
|
unused variable: `state`:
testprog/src/main.rs#L236
warning: unused variable: `state`
--> testprog/src/main.rs:236:45
|
236 | fn on_update(&mut self, ctx: &mut Ctx1, state: &i32) {
| ^^^^^ help: if this is intentional, prefix it with an underscore: `_state`
|
field `my2` is never read:
testprog/src/main.rs#L183
warning: field `my2` is never read
--> testprog/src/main.rs:183:5
|
180 | pub struct TestSystemManager {
| ----------------- field in this struct
...
183 | my2: MySystem2,
| ^^^
|
= note: `#[warn(dead_code)]` on by default
|
Build & Test (macos-11)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3, bp3d-actions/cargo@main. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
unused variable: `no_clear`:
codegen\src\clear.rs#L102
warning: unused variable: `no_clear`
--> codegen\src\clear.rs:102:13
|
102 | let no_clear = v.attrs.iter().any(|v| {
| ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_no_clear`
|
= note: `#[warn(unused_variables)]` on by default
|
unused variable: `no_clear`:
codegen\src\clear.rs#L124
warning: unused variable: `no_clear`
--> codegen\src\clear.rs:124:13
|
124 | let no_clear = f.attrs.iter().any(|v| {
| ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_no_clear`
|
unused variable: `no_clear`:
codegen\src\clear.rs#L102
warning: unused variable: `no_clear`
--> codegen\src\clear.rs:102:13
|
102 | let no_clear = v.attrs.iter().any(|v| {
| ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_no_clear`
|
= note: `#[warn(unused_variables)]` on by default
|
unused variable: `no_clear`:
codegen\src\clear.rs#L124
warning: unused variable: `no_clear`
--> codegen\src\clear.rs:124:13
|
124 | let no_clear = f.attrs.iter().any(|v| {
| ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_no_clear`
|
method `to_index` is never used:
codegen\src\dispatch.rs#L55
warning: method `to_index` is never used
--> codegen\src\dispatch.rs:55:12
|
40 | impl FieldName {
| -------------- method in this implementation
...
55 | pub fn to_index(&self) -> usize {
| ^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
|
method `to_index` is never used:
codegen\src\dispatch.rs#L55
warning: method `to_index` is never used
--> codegen\src\dispatch.rs:55:12
|
40 | impl FieldName {
| -------------- method in this implementation
...
55 | pub fn to_index(&self) -> usize {
| ^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
|
unused import: `Context as _`:
testprog\src\main.rs#L33
warning: unused import: `Context as _`
--> testprog\src\main.rs:33:29
|
33 | use regecs::object::{Class, Context as _, Object, ObjectRef};
| ^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
|
unnecessary parentheses around type:
testprog\src\main.rs#L209
warning: unnecessary parentheses around type
--> testprog\src\main.rs:209:22
|
209 | type Arguments = (i32);
| ^ ^
|
= note: `#[warn(unused_parens)]` on by default
help: remove these parentheses
|
209 - type Arguments = (i32);
209 + type Arguments = i32;
|
|
unused import: `regecs_codegen::New`:
testprog\src\main.rs#L216
warning: unused import: `regecs_codegen::New`
--> testprog\src\main.rs:216:5
|
216 | use regecs_codegen::New;
| ^^^^^^^^^^^^^^^^^^^
|
unused import: `regecs_codegen::Object`:
testprog\src\main.rs#L217
warning: unused import: `regecs_codegen::Object`
--> testprog\src\main.rs:217:5
|
217 | use regecs_codegen::Object;
| ^^^^^^^^^^^^^^^^^^^^^^
|
unused import: `regecs::component::list::List`:
testprog\src\main.rs#L30
warning: unused import: `regecs::component::list::List`
--> testprog\src\main.rs:30:5
|
30 | use regecs::component::list::List;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
unused import: `Context`:
testprog\src\main.rs#L35
warning: unused import: `Context`
--> testprog\src\main.rs:35:22
|
35 | use regecs::system::{Context as _, Update};
| ^^^^^^^
|
unused variable: `ctx`:
testprog\src\main.rs#L195
warning: unused variable: `ctx`
--> testprog\src\main.rs:195:28
|
195 | fn on_event(&mut self, ctx: &mut Ctx1, state: &i32, event: &Event<()>) {
| ^^^ help: if this is intentional, prefix it with an underscore: `_ctx`
|
= note: `#[warn(unused_variables)]` on by default
|
unused variable: `state`:
testprog\src\main.rs#L195
warning: unused variable: `state`
--> testprog\src\main.rs:195:44
|
195 | fn on_event(&mut self, ctx: &mut Ctx1, state: &i32, event: &Event<()>) {
| ^^^^^ help: if this is intentional, prefix it with an underscore: `_state`
|
unused variable: `event`:
testprog\src\main.rs#L195
warning: unused variable: `event`
--> testprog\src\main.rs:195:57
|
195 | fn on_event(&mut self, ctx: &mut Ctx1, state: &i32, event: &Event<()>) {
| ^^^^^ help: if this is intentional, prefix it with an underscore: `_event`
|
unused variable: `ctx`:
testprog\src\main.rs#L199
warning: unused variable: `ctx`
--> testprog\src\main.rs:199:29
|
199 | fn on_remove(&mut self, ctx: &mut Ctx1, state: &i32) {
| ^^^ help: if this is intentional, prefix it with an underscore: `_ctx`
|
unused variable: `state`:
testprog\src\main.rs#L199
warning: unused variable: `state`
--> testprog\src\main.rs:199:45
|
199 | fn on_remove(&mut self, ctx: &mut Ctx1, state: &i32) {
| ^^^^^ help: if this is intentional, prefix it with an underscore: `_state`
|
unused variable: `ctx`:
testprog\src\main.rs#L203
warning: unused variable: `ctx`
--> testprog\src\main.rs:203:29
|
203 | fn on_update(&mut self, ctx: &mut Ctx1, state: &i32) {
| ^^^ help: if this is intentional, prefix it with an underscore: `_ctx`
|
unused variable: `state`:
testprog\src\main.rs#L203
warning: unused variable: `state`
--> testprog\src\main.rs:203:45
|
203 | fn on_update(&mut self, ctx: &mut Ctx1, state: &i32) {
| ^^^^^ help: if this is intentional, prefix it with an underscore: `_state`
|
unused variable: `ctx`:
testprog\src\main.rs#L228
warning: unused variable: `ctx`
--> testprog\src\main.rs:228:28
|
228 | fn on_event(&mut self, ctx: &mut Ctx1, state: &i32, event: &Event<()>) {
| ^^^ help: if this is intentional, prefix it with an underscore: `_ctx`
|
unused variable: `state`:
testprog\src\main.rs#L228
warning: unused variable: `state`
--> testprog\src\main.rs:228:44
|
228 | fn on_event(&mut self, ctx: &mut Ctx1, state: &i32, event: &Event<()>) {
| ^^^^^ help: if this is intentional, prefix it with an underscore: `_state`
|
unused variable: `event`:
testprog\src\main.rs#L228
warning: unused variable: `event`
--> testprog\src\main.rs:228:57
|
228 | fn on_event(&mut self, ctx: &mut Ctx1, state: &i32, event: &Event<()>) {
| ^^^^^ help: if this is intentional, prefix it with an underscore: `_event`
|
unused variable: `ctx`:
testprog\src\main.rs#L232
warning: unused variable: `ctx`
--> testprog\src\main.rs:232:29
|
232 | fn on_remove(&mut self, ctx: &mut Ctx1, state: &i32) {
| ^^^ help: if this is intentional, prefix it with an underscore: `_ctx`
|
unused variable: `state`:
testprog\src\main.rs#L232
warning: unused variable: `state`
--> testprog\src\main.rs:232:45
|
232 | fn on_remove(&mut self, ctx: &mut Ctx1, state: &i32) {
| ^^^^^ help: if this is intentional, prefix it with an underscore: `_state`
|
unused variable: `ctx`:
testprog\src\main.rs#L236
warning: unused variable: `ctx`
--> testprog\src\main.rs:236:29
|
236 | fn on_update(&mut self, ctx: &mut Ctx1, state: &i32) {
| ^^^ help: if this is intentional, prefix it with an underscore: `_ctx`
|
unused variable: `state`:
testprog\src\main.rs#L236
warning: unused variable: `state`
--> testprog\src\main.rs:236:45
|
236 | fn on_update(&mut self, ctx: &mut Ctx1, state: &i32) {
| ^^^^^ help: if this is intentional, prefix it with an underscore: `_state`
|
field `my2` is never read:
testprog\src\main.rs#L183
warning: field `my2` is never read
--> testprog\src\main.rs:183:5
|
180 | pub struct TestSystemManager {
| ----------------- field in this struct
...
183 | my2: MySystem2,
| ^^^
|
= note: `#[warn(dead_code)]` on by default
|
Build & Test (windows-2019)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3, bp3d-actions/cargo@main. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
Get Version
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3, bp3d-actions/cargo-version@main. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
unneeded `return` statement:
testprog/src/main.rs#L158
warning: unneeded `return` statement
--> testprog/src/main.rs:158:9
|
158 | return MySystem { val: 0 };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
158 - return MySystem { val: 0 };
158 + MySystem { val: 0 }
|
|
unneeded `return` statement:
testprog/src/main.rs#L123
warning: unneeded `return` statement
--> testprog/src/main.rs:123:13
|
123 | / return ComplexSystem {
124 | | events: Vec::with_capacity(5),
125 | | };
| |_____________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
123 ~ ComplexSystem {
124 + events: Vec::with_capacity(5),
125 ~ }
|
|
unneeded `return` statement:
testprog/src/main.rs#L87
warning: unneeded `return` statement
--> testprog/src/main.rs:87:13
|
87 | / return ComplexComponent {
88 | | last_order: 0,
89 | | order,
90 | | value,
91 | | };
| |_____________^
|
= 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`
|
87 ~ ComplexComponent {
88 + last_order: 0,
89 + order,
90 + value,
91 ~ }
|
|
field `my2` is never read:
testprog/src/main.rs#L183
warning: field `my2` is never read
--> testprog/src/main.rs:183:5
|
180 | pub struct TestSystemManager {
| ----------------- field in this struct
...
183 | my2: MySystem2,
| ^^^
|
= note: `#[warn(dead_code)]` on by default
|
unused variable: `state`:
testprog/src/main.rs#L236
warning: unused variable: `state`
--> testprog/src/main.rs:236:45
|
236 | fn on_update(&mut self, ctx: &mut Ctx1, state: &i32) {
| ^^^^^ help: if this is intentional, prefix it with an underscore: `_state`
|
unused variable: `ctx`:
testprog/src/main.rs#L236
warning: unused variable: `ctx`
--> testprog/src/main.rs:236:29
|
236 | fn on_update(&mut self, ctx: &mut Ctx1, state: &i32) {
| ^^^ help: if this is intentional, prefix it with an underscore: `_ctx`
|
unused variable: `state`:
testprog/src/main.rs#L232
warning: unused variable: `state`
--> testprog/src/main.rs:232:45
|
232 | fn on_remove(&mut self, ctx: &mut Ctx1, state: &i32) {
| ^^^^^ help: if this is intentional, prefix it with an underscore: `_state`
|
unused variable: `ctx`:
testprog/src/main.rs#L232
warning: unused variable: `ctx`
--> testprog/src/main.rs:232:29
|
232 | fn on_remove(&mut self, ctx: &mut Ctx1, state: &i32) {
| ^^^ help: if this is intentional, prefix it with an underscore: `_ctx`
|
unused variable: `event`:
testprog/src/main.rs#L228
warning: unused variable: `event`
--> testprog/src/main.rs:228:57
|
228 | fn on_event(&mut self, ctx: &mut Ctx1, state: &i32, event: &Event<()>) {
| ^^^^^ help: if this is intentional, prefix it with an underscore: `_event`
|
unused variable: `state`:
testprog/src/main.rs#L228
warning: unused variable: `state`
--> testprog/src/main.rs:228:44
|
228 | fn on_event(&mut self, ctx: &mut Ctx1, state: &i32, event: &Event<()>) {
| ^^^^^ help: if this is intentional, prefix it with an underscore: `_state`
|
unused variable: `ctx`:
testprog/src/main.rs#L228
warning: unused variable: `ctx`
--> testprog/src/main.rs:228:28
|
228 | fn on_event(&mut self, ctx: &mut Ctx1, state: &i32, event: &Event<()>) {
| ^^^ help: if this is intentional, prefix it with an underscore: `_ctx`
|
unused variable: `state`:
testprog/src/main.rs#L203
warning: unused variable: `state`
--> testprog/src/main.rs:203:45
|
203 | fn on_update(&mut self, ctx: &mut Ctx1, state: &i32) {
| ^^^^^ help: if this is intentional, prefix it with an underscore: `_state`
|
unused variable: `ctx`:
testprog/src/main.rs#L203
warning: unused variable: `ctx`
--> testprog/src/main.rs:203:29
|
203 | fn on_update(&mut self, ctx: &mut Ctx1, state: &i32) {
| ^^^ help: if this is intentional, prefix it with an underscore: `_ctx`
|
unused variable: `state`:
testprog/src/main.rs#L199
warning: unused variable: `state`
--> testprog/src/main.rs:199:45
|
199 | fn on_remove(&mut self, ctx: &mut Ctx1, state: &i32) {
| ^^^^^ help: if this is intentional, prefix it with an underscore: `_state`
|
unused variable: `ctx`:
testprog/src/main.rs#L199
warning: unused variable: `ctx`
--> testprog/src/main.rs:199:29
|
199 | fn on_remove(&mut self, ctx: &mut Ctx1, state: &i32) {
| ^^^ help: if this is intentional, prefix it with an underscore: `_ctx`
|
unused variable: `event`:
testprog/src/main.rs#L195
warning: unused variable: `event`
--> testprog/src/main.rs:195:57
|
195 | fn on_event(&mut self, ctx: &mut Ctx1, state: &i32, event: &Event<()>) {
| ^^^^^ help: if this is intentional, prefix it with an underscore: `_event`
|
unused variable: `state`:
testprog/src/main.rs#L195
warning: unused variable: `state`
--> testprog/src/main.rs:195:44
|
195 | fn on_event(&mut self, ctx: &mut Ctx1, state: &i32, event: &Event<()>) {
| ^^^^^ help: if this is intentional, prefix it with an underscore: `_state`
|
unused variable: `ctx`:
testprog/src/main.rs#L195
warning: unused variable: `ctx`
--> testprog/src/main.rs:195:28
|
195 | fn on_event(&mut self, ctx: &mut Ctx1, state: &i32, event: &Event<()>) {
| ^^^ help: if this is intentional, prefix it with an underscore: `_ctx`
|
= note: `#[warn(unused_variables)]` on by default
|
unused import: `Context`:
testprog/src/main.rs#L35
warning: unused import: `Context`
--> testprog/src/main.rs:35:22
|
35 | use regecs::system::{Context as _, Update};
| ^^^^^^^
|
unused import: `regecs::component::list::List`:
testprog/src/main.rs#L30
warning: unused import: `regecs::component::list::List`
--> testprog/src/main.rs:30:5
|
30 | use regecs::component::list::List;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
unused import: `regecs_codegen::Object`:
testprog/src/main.rs#L217
warning: unused import: `regecs_codegen::Object`
--> testprog/src/main.rs:217:5
|
217 | use regecs_codegen::Object;
| ^^^^^^^^^^^^^^^^^^^^^^
|
unused import: `regecs_codegen::New`:
testprog/src/main.rs#L216
warning: unused import: `regecs_codegen::New`
--> testprog/src/main.rs:216:5
|
216 | use regecs_codegen::New;
| ^^^^^^^^^^^^^^^^^^^
|
unnecessary parentheses around type:
testprog/src/main.rs#L209
warning: unnecessary parentheses around type
--> testprog/src/main.rs:209:22
|
209 | type Arguments = (i32);
| ^ ^
|
= note: `#[warn(unused_parens)]` on by default
help: remove these parentheses
|
209 - type Arguments = (i32);
209 + type Arguments = i32;
|
|
unused import: `Context as _`:
testprog/src/main.rs#L33
warning: unused import: `Context as _`
--> testprog/src/main.rs:33:29
|
33 | use regecs::object::{Class, Context as _, Object, ObjectRef};
| ^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
|
this expression creates a reference which is immediately dereferenced by the compiler:
codegen/src/new_impl/build_arguments.rs#L176
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> codegen/src/new_impl/build_arguments.rs:176:59
|
176 | TraitBody::from_enum(items, name.clone(), &ctx)
| ^^^^ help: change this to: `ctx`
|
= 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
|
`if` chain can be rewritten with `match`:
codegen/src/new_impl/build_arguments.rs#L52
warning: `if` chain can be rewritten with `match`
--> codegen/src/new_impl/build_arguments.rs:52:9
|
52 | / if dispatches.len() == 1 {
53 | | let dispatch = dispatches.last().unwrap();
54 | | match dispatch {
55 | | Dispatch::Field(v) => {
... |
237 | | TraitBody::none()
238 | | }
| |_________^
|
= help: consider rewriting the `if` chain to use `cmp` and `match`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_chain
= note: `#[warn(clippy::comparison_chain)]` on by default
|
useless conversion to the same type: `std::ops::Range<usize>`:
codegen/src/fields_enum.rs#L43
warning: useless conversion to the same type: `std::ops::Range<usize>`
--> codegen/src/fields_enum.rs:43:30
|
43 | let idents: Vec<Ident> = (0..fields.unnamed.len())
| ______________________________^
44 | | .into_iter()
| |____________________^ help: consider removing `.into_iter()`: `(0..fields.unnamed.len())`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
= note: `#[warn(clippy::useless_conversion)]` on by default
|
length comparison to one:
codegen/src/dispatch.rs#L146
warning: length comparison to one
--> codegen/src/dispatch.rs:146:20
|
146 | if v.unnamed.len() < 1 {
| ^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `v.unnamed.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
|
method `to_index` is never used:
codegen/src/dispatch.rs#L55
warning: method `to_index` is never used
--> codegen/src/dispatch.rs:55:12
|
40 | impl FieldName {
| -------------- method in this implementation
...
55 | pub fn to_index(&self) -> usize {
| ^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
|
unused variable: `no_clear`:
codegen/src/clear.rs#L124
warning: unused variable: `no_clear`
--> codegen/src/clear.rs:124:13
|
124 | let no_clear = f.attrs.iter().any(|v| {
| ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_no_clear`
|
unused variable: `no_clear`:
codegen/src/clear.rs#L102
warning: unused variable: `no_clear`
--> codegen/src/clear.rs:102:13
|
102 | let no_clear = v.attrs.iter().any(|v| {
| ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_no_clear`
|
= note: `#[warn(unused_variables)]` on by default
|
this expression creates a reference which is immediately dereferenced by the compiler:
codegen/src/new_impl/build_arguments.rs#L176
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> codegen/src/new_impl/build_arguments.rs:176:59
|
176 | TraitBody::from_enum(items, name.clone(), &ctx)
| ^^^^ help: change this to: `ctx`
|
= 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
|
`if` chain can be rewritten with `match`:
codegen/src/new_impl/build_arguments.rs#L52
warning: `if` chain can be rewritten with `match`
--> codegen/src/new_impl/build_arguments.rs:52:9
|
52 | / if dispatches.len() == 1 {
53 | | let dispatch = dispatches.last().unwrap();
54 | | match dispatch {
55 | | Dispatch::Field(v) => {
... |
237 | | TraitBody::none()
238 | | }
| |_________^
|
= help: consider rewriting the `if` chain to use `cmp` and `match`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_chain
= note: `#[warn(clippy::comparison_chain)]` on by default
|
useless conversion to the same type: `std::ops::Range<usize>`:
codegen/src/fields_enum.rs#L43
warning: useless conversion to the same type: `std::ops::Range<usize>`
--> codegen/src/fields_enum.rs:43:30
|
43 | let idents: Vec<Ident> = (0..fields.unnamed.len())
| ______________________________^
44 | | .into_iter()
| |____________________^ help: consider removing `.into_iter()`: `(0..fields.unnamed.len())`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
= note: `#[warn(clippy::useless_conversion)]` on by default
|
length comparison to one:
codegen/src/dispatch.rs#L146
warning: length comparison to one
--> codegen/src/dispatch.rs:146:20
|
146 | if v.unnamed.len() < 1 {
| ^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `v.unnamed.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
|
method `to_index` is never used:
codegen/src/dispatch.rs#L55
warning: method `to_index` is never used
--> codegen/src/dispatch.rs:55:12
|
40 | impl FieldName {
| -------------- method in this implementation
...
55 | pub fn to_index(&self) -> usize {
| ^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
|
unused variable: `no_clear`:
codegen/src/clear.rs#L124
warning: unused variable: `no_clear`
--> codegen/src/clear.rs:124:13
|
124 | let no_clear = f.attrs.iter().any(|v| {
| ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_no_clear`
|
unused variable: `no_clear`:
codegen/src/clear.rs#L102
warning: unused variable: `no_clear`
--> codegen/src/clear.rs:102:13
|
102 | let no_clear = v.attrs.iter().any(|v| {
| ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_no_clear`
|
= note: `#[warn(unused_variables)]` on by default
|
unneeded `return` statement:
core/src/scene/state.rs#L133
warning: unneeded `return` statement
--> core/src/scene/state.rs:133:9
|
133 | return &mut self.systems;
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
133 - return &mut self.systems;
133 + &mut self.systems
|
|
unneeded `return` statement:
core/src/scene/state.rs#L129
warning: unneeded `return` statement
--> core/src/scene/state.rs:129:9
|
129 | return &self.systems;
| ^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
129 - return &self.systems;
129 + &self.systems
|
|
unneeded `return` statement:
core/src/scene/state.rs#L109
warning: unneeded `return` statement
--> core/src/scene/state.rs:109:9
|
109 | return &self.common.tree;
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
109 - return &self.common.tree;
109 + &self.common.tree
|
|
unneeded `return` statement:
core/src/scene/state.rs#L105
warning: unneeded `return` statement
--> core/src/scene/state.rs:105:9
|
105 | return &mut self.common.event_manager;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
105 - return &mut self.common.event_manager;
105 + &mut self.common.event_manager
|
|
unneeded `return` statement:
core/src/scene/state.rs#L101
warning: unneeded `return` statement
--> core/src/scene/state.rs:101:9
|
101 | return &mut self.common.component_manager;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
101 - return &mut self.common.component_manager;
101 + &mut self.common.component_manager
|
|
unneeded `return` statement:
core/src/scene/state.rs#L97
warning: unneeded `return` statement
--> core/src/scene/state.rs:97:9
|
97 | return &self.common.component_manager;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
97 - return &self.common.component_manager;
97 + &self.common.component_manager
|
|
unneeded `return` statement:
core/src/scene/state.rs#L63
warning: unneeded `return` statement
--> core/src/scene/state.rs:63:9
|
63 | return &self.tree;
| ^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
63 - return &self.tree;
63 + &self.tree
|
|
unneeded `return` statement:
core/src/scene/state.rs#L59
warning: unneeded `return` statement
--> core/src/scene/state.rs:59:9
|
59 | return &mut self.event_manager;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
59 - return &mut self.event_manager;
59 + &mut self.event_manager
|
|
unneeded `return` statement:
core/src/scene/state.rs#L55
warning: unneeded `return` statement
--> core/src/scene/state.rs:55:9
|
55 | return &mut self.component_manager;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
55 - return &mut self.component_manager;
55 + &mut self.component_manager
|
|
unneeded `return` statement:
core/src/scene/state.rs#L51
warning: unneeded `return` statement
--> core/src/scene/state.rs:51:9
|
51 | return &self.component_manager;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
51 - return &self.component_manager;
51 + &self.component_manager
|
|
methods called `new` usually take no `self`:
core/src/scene/interface.rs#L41
warning: methods called `new` usually take no `self`
--> core/src/scene/interface.rs:41:12
|
41 | fn new(self) -> (Self::ComponentManager, Self::SystemManager);
| ^^^^
|
= help: consider choosing a less ambiguous name
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention
= note: `#[warn(clippy::wrong_self_convention)]` on by default
|
all variants have the same postfix: `Object`:
core/src/scene/event.rs#L32
warning: all variants have the same postfix: `Object`
--> core/src/scene/event.rs:32:1
|
32 | / pub enum Type<C: Context> {
33 | | EnableObject(bool),
34 | | RemoveObject,
35 | | SpawnObject(C::Builder),
36 | | }
| |_^
|
= help: remove the postfixes and use full paths to the variants instead of glob imports
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names
= note: `#[warn(clippy::enum_variant_names)]` on by default
|
unneeded `return` statement:
core/src/scene/core.rs#L182
warning: unneeded `return` statement
--> core/src/scene/core.rs:182:9
|
182 | return (self.state.common.component_manager, self.state.systems);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
182 - return (self.state.common.component_manager, self.state.systems);
182 + (self.state.common.component_manager, self.state.systems)
|
|
this expression creates a reference which is immediately dereferenced by the compiler:
core/src/scene/core.rs#L75
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> core/src/scene/core.rs:75:46
|
75 | obj.on_event(&mut self.state, state, &event);
| ^^^^^^ help: change this to: `event`
|
= 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
|
use of `default` to create a unit struct:
core/src/scene/core.rs#L57
warning: use of `default` to create a unit struct
--> core/src/scene/core.rs:57:37
|
57 | useless: PhantomData::default(),
| ^^^^^^^^^^^ help: remove this call to `default`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#default_constructed_unit_structs
|
unneeded `return` statement:
core/src/scene/core.rs#L48
warning: unneeded `return` statement
--> core/src/scene/core.rs:48:9
|
48 | / return Scene {
49 | | state: ObjectState {
50 | | common: SystemState {
51 | | component_manager,
... |
60 | | updatable: HashSet::new()
61 | | };
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
48 ~ Scene {
49 + state: ObjectState {
50 + common: SystemState {
51 + component_manager,
52 + event_manager: EventManager::new(),
53 + system_event_manager: EventManager::new(),
54 + tree: Tree::new(),
55 + },
56 + systems,
57 + useless: PhantomData::default(),
58 + },
59 + objects: Storage::new(),
60 + updatable: HashSet::new()
61 ~ }
|
|
you should consider adding a `Default` implementation for `Storage<C>`:
core/src/object/storage.rs#L130
warning: you should consider adding a `Default` implementation for `Storage<C>`
--> core/src/object/storage.rs:130:5
|
130 | / pub fn new() -> Storage<C> {
131 | | Storage {
132 | | objects: Vec::new(),
133 | | }
134 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
help: try adding this
|
126 + impl<C: Context> Default for Storage<C>
127 + where
128 + C::Builder: Builder<C>,
129 + {
130 + fn default() -> Self {
131 + Self::new()
132 + }
133 + }
|
|
very complex type used. Consider factoring parts into `type` definitions:
core/src/object/storage.rs#L123
warning: very complex type used. Consider factoring parts into `type` definitions
--> core/src/object/storage.rs:123:14
|
123 | objects: Vec<Option<Box<<C::Builder as Builder<C>>::Object>>>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity
= note: `#[warn(clippy::type_complexity)]` on by default
|
unneeded `return` statement:
core/src/object/storage.rs#L110
warning: unneeded `return` statement
--> core/src/object/storage.rs:110:9
|
110 | / return Tree {
111 | | enabled: HashSet::new(),
112 | | by_class: HashMap::new(),
113 | | by_id: HashMap::new(),
114 | | count: 0,
115 | | };
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
110 ~ Tree {
111 + enabled: HashSet::new(),
112 + by_class: HashMap::new(),
113 + by_id: HashMap::new(),
114 + count: 0,
115 ~ }
|
|
use of `or_insert_with` to construct default value:
core/src/object/storage.rs#L87
warning: use of `or_insert_with` to construct default value
--> core/src/object/storage.rs:87:14
|
87 | .or_insert_with(Vec::new);
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default
|
unneeded `return` statement:
core/src/object/storage.rs#L54
warning: unneeded `return` statement
--> core/src/object/storage.rs:54:9
|
54 | return self.count;
| ^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
54 - return self.count;
54 + self.count
|
|
struct `Tree` has a public `len` method, but no `is_empty` method:
core/src/object/storage.rs#L53
warning: struct `Tree` has a public `len` method, but no `is_empty` method
--> core/src/object/storage.rs:53:5
|
53 | pub fn len(&self) -> usize {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_without_is_empty
|
unneeded `return` statement:
core/src/object/storage.rs#L50
warning: unneeded `return` statement
--> core/src/object/storage.rs:50:9
|
50 | return self.by_id.contains_key(&obj);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
50 - return self.by_id.contains_key(&obj);
50 + self.by_id.contains_key(&obj)
|
|
unneeded `return` statement:
core/src/object/storage.rs#L46
warning: unneeded `return` statement
--> core/src/object/storage.rs:46:9
|
46 | return self.enabled.contains(&obj);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
46 - return self.enabled.contains(&obj);
46 + self.enabled.contains(&obj)
|
|
you should consider adding a `Default` implementation for `Flags`:
core/src/object/interface.rs#L95
warning: you should consider adding a `Default` implementation for `Flags`
--> core/src/object/interface.rs:95:5
|
95 | / pub fn new() -> Flags {
96 | | Flags {
97 | | updates: false,
98 | | receives_events: false
99 | | }
100 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
help: try adding this
|
94 + impl Default for Flags {
95 + fn default() -> Self {
96 + Self::new()
97 + }
98 + }
|
|
unneeded `return` statement:
core/src/event.rs#L111
warning: unneeded `return` statement
--> core/src/event.rs:111:9
|
111 | return self.events.pop_front();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
111 - return self.events.pop_front();
111 + self.events.pop_front()
|
|
you should consider adding a `Default` implementation for `EventManager<E>`:
core/src/event.rs#L100
warning: you should consider adding a `Default` implementation for `EventManager<E>`
--> core/src/event.rs:100:5
|
100 | / pub fn new() -> EventManager<E> {
101 | | EventManager {
102 | | events: VecDeque::new(),
103 | | }
104 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
help: try adding this
|
99 + impl<E> Default for EventManager<E> {
100 + fn default() -> Self {
101 + Self::new()
102 + }
103 + }
|
|
unneeded `return` statement:
core/src/entity.rs#L91
warning: unneeded `return` statement
--> core/src/entity.rs:91:9
|
91 | return EntityHelper { mgr, entity };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
91 - return EntityHelper { mgr, entity };
91 + EntityHelper { mgr, entity }
|
|
unneeded `return` statement:
core/src/entity.rs#L55
warning: unneeded `return` statement
--> core/src/entity.rs:55:9
|
55 | return ComponentType::<T>::new();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
55 - return ComponentType::<T>::new();
55 + ComponentType::<T>::new()
|
|
use of `default` to create a unit struct:
core/src/entity.rs#L44
warning: use of `default` to create a unit struct
--> core/src/entity.rs:44:46
|
44 | useless: std::marker::PhantomData::default(),
| ^^^^^^^^^^^ help: remove this call to `default`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#default_constructed_unit_structs
= note: `#[warn(clippy::default_constructed_unit_structs)]` on by default
|
unneeded `return` statement:
core/src/entity.rs#L43
warning: unneeded `return` statement
--> core/src/entity.rs:43:9
|
43 | / return ComponentType {
44 | | useless: std::marker::PhantomData::default(),
45 | | };
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
43 ~ ComponentType {
44 + useless: std::marker::PhantomData::default(),
45 ~ }
|
|
you should consider adding a `Default` implementation for `ComponentType<T>`:
core/src/entity.rs#L42
warning: you should consider adding a `Default` implementation for `ComponentType<T>`
--> core/src/entity.rs:42:5
|
42 | / pub fn new() -> ComponentType<T> {
43 | | return ComponentType {
44 | | useless: std::marker::PhantomData::default(),
45 | | };
46 | | }
| |_____^
|
= 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
|
41 + impl<T: Component> Default for ComponentType<T> {
42 + fn default() -> Self {
43 + Self::new()
44 + }
45 + }
|
|
struct `ComponentStore` has a public `len` method, but no `is_empty` method:
core/src/component/store.rs#L101
warning: struct `ComponentStore` has a public `len` method, but no `is_empty` method
--> core/src/component/store.rs:101:5
|
101 | pub fn len(&self) -> usize {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_without_is_empty
= note: `#[warn(clippy::len_without_is_empty)]` on by default
|
unneeded `return` statement:
core/src/component/attachments.rs#L55
warning: unneeded `return` statement
--> core/src/component/attachments.rs:55:9
|
55 | / return AttachmentsManager {
56 | | map: HashMap::new(),
57 | | inv_map: HashMap::new(),
58 | | };
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
55 ~ AttachmentsManager {
56 + map: HashMap::new(),
57 + inv_map: HashMap::new(),
58 ~ }
|
|
non-canonical implementation of `clone` on a `Copy` type:
core/src/component/interface.rs#L51
warning: non-canonical implementation of `clone` on a `Copy` type
--> core/src/component/interface.rs:51:29
|
51 | fn clone(&self) -> Self {
| _____________________________^
52 | | Self {
53 | | index: self.index,
54 | | useless: self.useless,
55 | | }
56 | | }
| |_____^ help: change this to: `{ *self }`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_canonical_clone_impl
= note: `#[warn(clippy::non_canonical_clone_impl)]` on by default
|
unneeded `return` statement:
core/src/component/list/grouped.rs#L180
warning: unneeded `return` statement
--> core/src/component/list/grouped.rs:180:9
|
180 | return self.comps.len();
| ^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
180 - return self.comps.len();
180 + self.comps.len()
|
|
unneeded `return` statement:
core/src/component/list/grouped.rs#L149
warning: unneeded `return` statement
--> core/src/component/list/grouped.rs:149:9
|
149 | / return GroupComponentList {
150 | | comps: BasicComponentList::default(),
151 | | group_map: HashMap::new(),
152 | | map: HashMap::new(),
153 | | };
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
149 ~ GroupComponentList {
150 + comps: BasicComponentList::default(),
151 + group_map: HashMap::new(),
152 + map: HashMap::new(),
153 ~ }
|
|
use of `or_insert_with` to construct default value:
core/src/component/list/grouped.rs#L142
warning: use of `or_insert_with` to construct default value
--> core/src/component/list/grouped.rs:142:45
|
142 | let val = self.map.entry(new_group).or_insert_with(Vec::new);
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default
|
use of `or_insert_with` to construct default value:
core/src/component/list/grouped.rs#L134
warning: use of `or_insert_with` to construct default value
--> core/src/component/list/grouped.rs:134:45
|
134 | let val = self.map.entry(*prev).or_insert_with(Vec::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
|
unneeded `return` statement:
core/src/component/list/basic.rs#L104
warning: unneeded `return` statement
--> core/src/component/list/basic.rs:104:9
|
104 | / return BasicComponentList {
105 | | comps: Vec::new(),
106 | | size: 0
107 | | };
| |_________^
|
= 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`
|
104 ~ BasicComponentList {
105 + comps: Vec::new(),
106 + size: 0
107 ~ }
|
|
Check | Audit
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3, bp3d-actions/audit-check@main. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
Check | Clippy
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3, bp3d-actions/clippy-check@main. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
Format Code
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3, bp3d-actions/rustfmt-check@main. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|