reviewdog [clippy] report
reported by reviewdog 🐶
Findings (4)
framework/snippets/src/network_response.rs|18 col 9| warning: unnecessary operation
--> framework/snippets/src/network_response.rs:18:9
|
18 | / TxResponse {
19 | | tx_error,
20 | | ..Default::default()
21 | | };
| |_______^ help: statement can be reduced to: tx_error;Default::default();
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_operation
= note: #[warn(clippy::unnecessary_operation)]
on by default
framework/snippets/src/network_response.rs|60 col 12| warning: if let can be simplified with .unwrap_or_default()
--> framework/snippets/src/network_response.rs:60:12
|
60 | } else if let Some(data) = process_out_from_log(tx) {
| ^
61 | | data
62 | | } else {
63 | | Vec::new()
64 | | }
| |^ help: replace it with: process_out_from_log(tx).unwrap_or_default()
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or_default
= note: #[warn(clippy::manual_unwrap_or_default)]
on by default
framework/snippets/src/network_response.rs|18 col 9| warning: unnecessary operation
--> framework/snippets/src/network_response.rs:18:9
|
18 | / TxResponse {
19 | | tx_error,
20 | | ..Default::default()
21 | | };
| |^ help: statement can be reduced to: tx_error;Default::default();
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_operation
= note: #[warn(clippy::unnecessary_operation)]
on by default
framework/snippets/src/network_response.rs|60 col 12| warning: if let can be simplified with .unwrap_or_default()
--> framework/snippets/src/network_response.rs:60:12
|
60 | } else if let Some(data) = process_out_from_log(tx) {
| _______^
61 | | data
62 | | } else {
63 | | Vec::new()
64 | | }
| |^ help: replace it with: process_out_from_log(tx).unwrap_or_default()
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or_default
= note: #[warn(clippy::manual_unwrap_or_default)]
on by default
Filtered Findings (4)
framework/base/src/storage/mappers/vec_mapper.rs|15 col 33| warning: importing legacy numeric constants
--> framework/base/src/storage/mappers/vec_mapper.rs:15:33
|
15 | use core::{marker::PhantomData, usize};
| ^^^^^
|
= help: remove this import
= note: then usize::<CONST>
will resolve to the respective associated constant
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
= note: #[warn(clippy::legacy_numeric_constants)]
on by default
framework/base/src/storage/mappers/vec_mapper.rs|15 col 33| warning: importing legacy numeric constants
--> framework/base/src/storage/mappers/vec_mapper.rs:15:33
|
15 | use core::{marker::PhantomData, usize};
| ^^^^^
|
= help: remove this import
= note: then usize::<CONST>
will resolve to the respective associated constant
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
= note: #[warn(clippy::legacy_numeric_constants)]
on by default
contracts/feature-tests/abi-tester/src/abi_test_type.rs|47 col 12| warning: field field
is never read
--> contracts/feature-tests/abi-tester/src/abi_test_type.rs:48:9
|
47 | pub struct ManagedDecimalWrapper<M: ManagedTypeApi> {
| --------------------- field in this struct
48 | pub field: ManagedDecimal<M, ConstDecimals<2>>,
| ^^^^^
|
= note: #[warn(dead_code)]
on by default
contracts/feature-tests/abi-tester/src/abi_test_type.rs|47 col 12| warning: field field
is never read
--> contracts/feature-tests/abi-tester/src/abi_test_type.rs:48:9
|
47 | pub struct ManagedDecimalWrapper<M: ManagedTypeApi> {
| --------------------- field in this struct
48 | pub field: ManagedDecimal<M, ConstDecimals<2>>,
| ^^^^^
|
= note: #[warn(dead_code)]
on by default
Annotations
Check warning on line 18 in framework/snippets/src/network_response.rs
github-actions / clippy
[clippy] framework/snippets/src/network_response.rs#L18
warning: unnecessary operation
--> framework/snippets/src/network_response.rs:18:9
|
18 | / TxResponse {
19 | | tx_error,
20 | | ..Default::default()
21 | | };
| |__________^ help: statement can be reduced to: `tx_error;Default::default();`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_operation
= note: `#[warn(clippy::unnecessary_operation)]` on by default
Raw output
framework/snippets/src/network_response.rs:18:9:w:warning: unnecessary operation
--> framework/snippets/src/network_response.rs:18:9
|
18 | / TxResponse {
19 | | tx_error,
20 | | ..Default::default()
21 | | };
| |__________^ help: statement can be reduced to: `tx_error;Default::default();`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_operation
= note: `#[warn(clippy::unnecessary_operation)]` on by default
__END__
Check warning on line 60 in framework/snippets/src/network_response.rs
github-actions / clippy
[clippy] framework/snippets/src/network_response.rs#L60
warning: if let can be simplified with `.unwrap_or_default()`
--> framework/snippets/src/network_response.rs:60:12
|
60 | } else if let Some(data) = process_out_from_log(tx) {
| ____________^
61 | | data
62 | | } else {
63 | | Vec::new()
64 | | }
| |_____^ help: replace it with: `process_out_from_log(tx).unwrap_or_default()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or_default
= note: `#[warn(clippy::manual_unwrap_or_default)]` on by default
Raw output
framework/snippets/src/network_response.rs:60:12:w:warning: if let can be simplified with `.unwrap_or_default()`
--> framework/snippets/src/network_response.rs:60:12
|
60 | } else if let Some(data) = process_out_from_log(tx) {
| ____________^
61 | | data
62 | | } else {
63 | | Vec::new()
64 | | }
| |_____^ help: replace it with: `process_out_from_log(tx).unwrap_or_default()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or_default
= note: `#[warn(clippy::manual_unwrap_or_default)]` on by default
__END__
Check warning on line 18 in framework/snippets/src/network_response.rs
github-actions / clippy
[clippy] framework/snippets/src/network_response.rs#L18
warning: unnecessary operation
--> framework/snippets/src/network_response.rs:18:9
|
18 | / TxResponse {
19 | | tx_error,
20 | | ..Default::default()
21 | | };
| |__________^ help: statement can be reduced to: `tx_error;Default::default();`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_operation
= note: `#[warn(clippy::unnecessary_operation)]` on by default
Raw output
framework/snippets/src/network_response.rs:18:9:w:warning: unnecessary operation
--> framework/snippets/src/network_response.rs:18:9
|
18 | / TxResponse {
19 | | tx_error,
20 | | ..Default::default()
21 | | };
| |__________^ help: statement can be reduced to: `tx_error;Default::default();`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_operation
= note: `#[warn(clippy::unnecessary_operation)]` on by default
__END__
Check warning on line 60 in framework/snippets/src/network_response.rs
github-actions / clippy
[clippy] framework/snippets/src/network_response.rs#L60
warning: if let can be simplified with `.unwrap_or_default()`
--> framework/snippets/src/network_response.rs:60:12
|
60 | } else if let Some(data) = process_out_from_log(tx) {
| ____________^
61 | | data
62 | | } else {
63 | | Vec::new()
64 | | }
| |_____^ help: replace it with: `process_out_from_log(tx).unwrap_or_default()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or_default
= note: `#[warn(clippy::manual_unwrap_or_default)]` on by default
Raw output
framework/snippets/src/network_response.rs:60:12:w:warning: if let can be simplified with `.unwrap_or_default()`
--> framework/snippets/src/network_response.rs:60:12
|
60 | } else if let Some(data) = process_out_from_log(tx) {
| ____________^
61 | | data
62 | | } else {
63 | | Vec::new()
64 | | }
| |_____^ help: replace it with: `process_out_from_log(tx).unwrap_or_default()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or_default
= note: `#[warn(clippy::manual_unwrap_or_default)]` on by default
__END__