Fix FeaturesConfig for test runner #537
Annotations
17 warnings
field assignment outside of initializer for an instance created with Default::default():
tools/moorc/src/main.rs#L264
warning: field assignment outside of initializer for an instance created with Default::default()
--> tools/moorc/src/main.rs:264:9
|
264 | config.features_config = features;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: consider initializing the variable with `moor_kernel::config::Config { features_config: features, ..Default::default() }` and removing relevant reassignments
--> tools/moorc/src/main.rs:263:9
|
263 | let mut config = Config::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
|
called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()`:
tools/moorc/src/main.rs#L139
warning: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()`
--> tools/moorc/src/main.rs:139:5
|
139 | / args.feature_args
140 | | .as_ref()
141 | | .map(|fa| fa.merge_config(&mut features));
| |_________________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn
= note: `#[warn(clippy::option_map_unit_fn)]` on by default
help: try
|
139 ~ if let Some(fa) = args.feature_args
140 + .as_ref() { fa.merge_config(&mut features) }
|
|
using `clone` on type `Symbol` which implements the `Copy` trait:
crates/kernel/src/vm/moo_execute.rs#L970
warning: using `clone` on type `Symbol` which implements the `Copy` trait
--> crates/kernel/src/vm/moo_execute.rs:970:39
|
970 | ... v_sym(k.clone())
| ^^^^^^^^^ help: try dereferencing it: `*k`
|
= 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
|
unneeded `return` statement:
crates/compiler/src/parse.rs#L447
warning: unneeded `return` statement
--> crates/compiler/src/parse.rs:447:25
|
447 | / return Err(CompileError::StringLexError(format!(
448 | | "invalid integer literal '{}': {e}",
449 | | primary.as_str()
450 | | )));
| |___________________________^
|
= 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`
|
447 ~ Err(CompileError::StringLexError(format!(
448 + "invalid integer literal '{}': {e}",
449 + primary.as_str()
450 ~ )))
|
|
this expression creates a reference which is immediately dereferenced by the compiler:
crates/testing/moot/src/lib.rs#L134
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> crates/testing/moot/src/lib.rs:134:47
|
134 | player = handle_change_player(&options, change.name)
| ^^^^^^^^ help: change this to: `options`
|
= 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:
crates/testing/moot/src/lib.rs#L122
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> crates/testing/moot/src/lib.rs:122:18
|
122 | init_logging(&options);
| ^^^^^^^^ help: change this to: `options`
|
= 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
|
method `default` can be confused for the standard trait method `std::default::Default::default`:
crates/testing/moot/src/lib.rs#L82
warning: method `default` can be confused for the standard trait method `std::default::Default::default`
--> crates/testing/moot/src/lib.rs:82:5
|
82 | / pub fn default() -> Self {
83 | | Self {
84 | | init_logging: false,
85 | | wizard_object: WIZARD,
... |
88 | | }
89 | | }
| |_____^
|
= help: consider implementing the trait `std::default::Default` or choosing a less ambiguous method name
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait
= note: `#[warn(clippy::should_implement_trait)]` on by default
|
you should consider adding a `Default` implementation for `MootOptions`:
crates/testing/moot/src/lib.rs#L91
warning: you should consider adding a `Default` implementation for `MootOptions`
--> crates/testing/moot/src/lib.rs:91:5
|
91 | / pub fn new() -> Self {
92 | | Self::default()
93 | | }
| |_____^
|
= 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
|
81 + impl Default for MootOptions {
82 + fn default() -> Self {
83 + Self::new()
84 + }
85 + }
|
|
field assignment outside of initializer for an instance created with Default::default():
tools/moorc/src/main.rs#L264
warning: field assignment outside of initializer for an instance created with Default::default()
--> tools/moorc/src/main.rs:264:9
|
264 | config.features_config = features;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: consider initializing the variable with `moor_kernel::config::Config { features_config: features, ..Default::default() }` and removing relevant reassignments
--> tools/moorc/src/main.rs:263:9
|
263 | let mut config = Config::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
|
called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()`:
tools/moorc/src/main.rs#L139
warning: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()`
--> tools/moorc/src/main.rs:139:5
|
139 | / args.feature_args
140 | | .as_ref()
141 | | .map(|fa| fa.merge_config(&mut features));
| |_________________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn
= note: `#[warn(clippy::option_map_unit_fn)]` on by default
help: try
|
139 ~ if let Some(fa) = args.feature_args
140 + .as_ref() { fa.merge_config(&mut features) }
|
|
using `clone` on type `Symbol` which implements the `Copy` trait:
crates/kernel/src/vm/moo_execute.rs#L970
warning: using `clone` on type `Symbol` which implements the `Copy` trait
--> crates/kernel/src/vm/moo_execute.rs:970:39
|
970 | ... v_sym(k.clone())
| ^^^^^^^^^ help: try dereferencing it: `*k`
|
= 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
|
unneeded `return` statement:
crates/compiler/src/parse.rs#L447
warning: unneeded `return` statement
--> crates/compiler/src/parse.rs:447:25
|
447 | / return Err(CompileError::StringLexError(format!(
448 | | "invalid integer literal '{}': {e}",
449 | | primary.as_str()
450 | | )));
| |___________________________^
|
= 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`
|
447 ~ Err(CompileError::StringLexError(format!(
448 + "invalid integer literal '{}': {e}",
449 + primary.as_str()
450 ~ )))
|
|
this expression creates a reference which is immediately dereferenced by the compiler:
crates/testing/moot/src/lib.rs#L134
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> crates/testing/moot/src/lib.rs:134:47
|
134 | player = handle_change_player(&options, change.name)
| ^^^^^^^^ help: change this to: `options`
|
= 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:
crates/testing/moot/src/lib.rs#L122
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> crates/testing/moot/src/lib.rs:122:18
|
122 | init_logging(&options);
| ^^^^^^^^ help: change this to: `options`
|
= 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
|
method `default` can be confused for the standard trait method `std::default::Default::default`:
crates/testing/moot/src/lib.rs#L82
warning: method `default` can be confused for the standard trait method `std::default::Default::default`
--> crates/testing/moot/src/lib.rs:82:5
|
82 | / pub fn default() -> Self {
83 | | Self {
84 | | init_logging: false,
85 | | wizard_object: WIZARD,
... |
88 | | }
89 | | }
| |_____^
|
= help: consider implementing the trait `std::default::Default` or choosing a less ambiguous method name
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait
= note: `#[warn(clippy::should_implement_trait)]` on by default
|
you should consider adding a `Default` implementation for `MootOptions`:
crates/testing/moot/src/lib.rs#L91
warning: you should consider adding a `Default` implementation for `MootOptions`
--> crates/testing/moot/src/lib.rs:91:5
|
91 | / pub fn new() -> Self {
92 | | Self::default()
93 | | }
| |_____^
|
= 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
|
81 + impl Default for MootOptions {
82 + fn default() -> Self {
83 + Self::new()
84 + }
85 + }
|
|
style
Unexpected input(s) 'dprint-version', valid inputs are ['entryPoint', 'args']
|