feat(utils): calldatacopy argument heuristics #534
Annotations
4 errors and 11 warnings
rustfmt
Process completed with exit code 1.
|
test macos-latest
Process completed with exit code 100.
|
test ubuntu-latest
The job was canceled because "macos-latest" failed.
|
test ubuntu-latest
The operation was canceled.
|
check
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
clippy
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3, giraffate/clippy-action@v1. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
clippy:
crates/common/src/ether/tokenize.rs#L4
[clippy] reported by reviewdog 🐶
<pre><code>warning: struct `Expression` is never constructed
--> crates/common/src/ether/tokenize.rs:4:12
|
4 | pub struct Expression(Token);
| ^^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
</code></pre>
Raw Output:
crates/common/src/ether/tokenize.rs:4:12:w:
<pre><code>warning: struct `Expression` is never constructed
--> crates/common/src/ether/tokenize.rs:4:12
|
4 | pub struct Expression(Token);
| ^^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
</code></pre>
__END__
|
clippy:
crates/decode/src/utils/constructor.rs#L8
[clippy] reported by reviewdog 🐶
<pre><code>warning: fields `constructor`, `contract`, and `metadata` are never read
--> crates/decode/src/utils/constructor.rs:9:9
|
8 | pub struct Constructor {
| ----------- fields in this struct
9 | pub constructor: Vec<u8>,
| ^^^^^^^^^^^
10 | pub contract: Vec<u8>,
| ^^^^^^^^
11 | pub metadata: Vec<u8>,
| ^^^^^^^^
|
= note: `Constructor` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis
= note: `#[warn(dead_code)]` on by default
</code></pre>
Raw Output:
crates/decode/src/utils/constructor.rs:8:12:w:
<pre><code>warning: fields `constructor`, `contract`, and `metadata` are never read
--> crates/decode/src/utils/constructor.rs:9:9
|
8 | pub struct Constructor {
| ----------- fields in this struct
9 | pub constructor: Vec<u8>,
| ^^^^^^^^^^^
10 | pub contract: Vec<u8>,
| ^^^^^^^^
11 | pub metadata: Vec<u8>,
| ^^^^^^^^
|
= note: `Constructor` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis
= note: `#[warn(dead_code)]` on by default
</code></pre>
__END__
|
clippy:
crates/decode/src/core/mod.rs#L95
[clippy] reported by reviewdog 🐶
<pre><code>warning: match can be simplified with `.unwrap_or_default()`
--> crates/decode/src/core/mod.rs:95:9
|
95 | / match ResolvedFunction::resolve(&function_selector).await {
96 | | Ok(Some(signatures)) => signatures,
97 | | _ => Vec::new(),
98 | | }
| |_________^ help: replace it with: `(ResolvedFunction::resolve(&function_selector).await).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
</code></pre>
Raw Output:
crates/decode/src/core/mod.rs:95:9:w:
<pre><code>warning: match can be simplified with `.unwrap_or_default()`
--> crates/decode/src/core/mod.rs:95:9
|
95 | / match ResolvedFunction::resolve(&function_selector).await {
96 | | Ok(Some(signatures)) => signatures,
97 | | _ => Vec::new(),
98 | | }
| |_________^ help: replace it with: `(ResolvedFunction::resolve(&function_selector).await).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
</code></pre>
__END__
|
clippy:
crates/decompile/src/utils/heuristics/arguments.rs#L9
[clippy] reported by reviewdog 🐶
<pre><code>warning: unused import: `trace`
--> crates/decompile/src/utils/heuristics/arguments.rs:9:22
|
9 | use tracing::{debug, trace};
| ^^^^^
|
= note: `#[warn(unused_imports)]` on by default
</code></pre>
Raw Output:
crates/decompile/src/utils/heuristics/arguments.rs:9:22:w:
<pre><code>warning: unused import: `trace`
--> crates/decompile/src/utils/heuristics/arguments.rs:9:22
|
9 | use tracing::{debug, trace};
| ^^^^^
|
= note: `#[warn(unused_imports)]` on by default
</code></pre>
__END__
|
clippy:
crates/cfg/src/core/mod.rs#L77
[clippy] reported by reviewdog 🐶
<pre><code>warning: usage of a legacy numeric method
--> crates/cfg/src/core/mod.rs:77:15
|
77 | u128::max_value(),
| ^^^^^^^^^^^
|
= 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
help: use the associated constant instead
|
77 | u128::MAX,
| ~~~
</code></pre>
Raw Output:
crates/cfg/src/core/mod.rs:77:15:w:
<pre><code>warning: usage of a legacy numeric method
--> crates/cfg/src/core/mod.rs:77:15
|
77 | u128::max_value(),
| ^^^^^^^^^^^
|
= 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
help: use the associated constant instead
|
77 | u128::MAX,
| ~~~
</code></pre>
__END__
|
clippy:
crates/decompile/src/core/out/source.rs#L306
[clippy] reported by reviewdog 🐶
<pre><code>warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do
--> crates/decompile/src/core/out/source.rs:306:26
|
306 | fn indent_source(source: &mut Vec<String>) {
| ^^^^^^^^^^^^^^^^ help: change this to: `&mut [String]`
|
= 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
</code></pre>
Raw Output:
crates/decompile/src/core/out/source.rs:306:26:w:
<pre><code>warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do
--> crates/decompile/src/core/out/source.rs:306:26
|
306 | fn indent_source(source: &mut Vec<String>) {
| ^^^^^^^^^^^^^^^^ help: change this to: `&mut [String]`
|
= 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
</code></pre>
__END__
|
clippy:
crates/decompile/src/core/out/source.rs#L328
[clippy] reported by reviewdog 🐶
<pre><code>warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do
--> crates/decompile/src/core/out/source.rs:328:38
|
328 | fn get_indentation_imbalance(source: &Vec<String>) -> i32 {
| ^^^^^^^^^^^^ help: change this to: `&[String]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg
</code></pre>
Raw Output:
crates/decompile/src/core/out/source.rs:328:38:w:
<pre><code>warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do
--> crates/decompile/src/core/out/source.rs:328:38
|
328 | fn get_indentation_imbalance(source: &Vec<String>) -> i32 {
| ^^^^^^^^^^^^ help: change this to: `&[String]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg
</code></pre>
__END__
|
clippy:
crates/decompile/src/core/mod.rs#L82
[clippy] reported by reviewdog 🐶
<pre><code>warning: usage of a legacy numeric method
--> crates/decompile/src/core/mod.rs:82:15
|
82 | u128::max_value(),
| ^^^^^^^^^^^
|
= 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
help: use the associated constant instead
|
82 | u128::MAX,
| ~~~
</code></pre>
Raw Output:
crates/decompile/src/core/mod.rs:82:15:w:
<pre><code>warning: usage of a legacy numeric method
--> crates/decompile/src/core/mod.rs:82:15
|
82 | u128::max_value(),
| ^^^^^^^^^^^
|
= 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
help: use the associated constant instead
|
82 | u128::MAX,
| ~~~
</code></pre>
__END__
|
test macos-latest
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|