chore(decode): cleanup decode, simplify logic, add comments #288
Triggered via pull request
December 20, 2023 18:25
Status
Success
Total duration
14m 46s
Artifacts
–
Annotations
6 warnings
clippy:
common/src/ether/evm/ext/exec/mod.rs#L70
[clippy] reported by reviewdog 🐶
<pre><code>warning: parameter is only used in recursion
--> common/src/ether/evm/ext/exec/mod.rs:70:9
|
70 | logger: &Logger,
| ^^^^^^ help: if this is intentional, prefix it with an underscore: `_logger`
|
note: parameter used here
--> common/src/ether/evm/ext/exec/mod.rs:242:25
|
242 | logger,
| ^^^^^^
...
246 | vm_trace.children.push(vm.recursive_map(branch_count, handled_jumps, logger));
| ^^^^^^
...
255 | logger,
| ^^^^^^
...
259 | vm_trace.children.push(vm.recursive_map(branch_count, handled_jumps, logger));
| ^^^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#only_used_in_recursion
= note: `#[warn(clippy::only_used_in_recursion)]` on by default
</code></pre>
Raw Output:
common/src/ether/evm/ext/exec/mod.rs:70:9:w:
<pre><code>warning: parameter is only used in recursion
--> common/src/ether/evm/ext/exec/mod.rs:70:9
|
70 | logger: &Logger,
| ^^^^^^ help: if this is intentional, prefix it with an underscore: `_logger`
|
note: parameter used here
--> common/src/ether/evm/ext/exec/mod.rs:242:25
|
242 | logger,
| ^^^^^^
...
246 | vm_trace.children.push(vm.recursive_map(branch_count, handled_jumps, logger));
| ^^^^^^
...
255 | logger,
| ^^^^^^
...
259 | vm_trace.children.push(vm.recursive_map(branch_count, handled_jumps, logger));
| ^^^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#only_used_in_recursion
= note: `#[warn(clippy::only_used_in_recursion)]` on by default
</code></pre>
__END__
|
clippy:
common/src/utils/range_map.rs#L108
[clippy] reported by reviewdog 🐶
<pre><code>warning: deref which would be done by auto-deref
--> common/src/utils/range_map.rs:108:62
|
108 | .filter(|incumbent| Self::range_collides(&range, *incumbent))
| ^^^^^^^^^^ help: try: `incumbent`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
= note: `#[warn(clippy::explicit_auto_deref)]` on by default
</code></pre>
Raw Output:
common/src/utils/range_map.rs:108:62:w:
<pre><code>warning: deref which would be done by auto-deref
--> common/src/utils/range_map.rs:108:62
|
108 | .filter(|incumbent| Self::range_collides(&range, *incumbent))
| ^^^^^^^^^^ help: try: `incumbent`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
= note: `#[warn(clippy::explicit_auto_deref)]` on by default
</code></pre>
__END__
|
clippy:
common/src/utils/range_map.rs#L114
[clippy] reported by reviewdog 🐶
<pre><code>warning: this boolean expression can be simplified
--> common/src/utils/range_map.rs:114:9
|
114 | / (incoming.start <= incumbent.start && incoming.end >= incumbent.end) ||
115 | | (incoming.start <= incumbent.start && incoming.end >= incumbent.start) ||
116 | | (incoming.start <= incumbent.end && incoming.end >= incumbent.end) ||
117 | | (incoming.start > incumbent.start && incoming.end < incumbent.end)
| |______________________________________________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool
= note: `#[warn(clippy::nonminimal_bool)]` on by default
help: try
|
114 | !(incoming.start <= incumbent.start && incoming.end < incumbent.end && incoming.end < incumbent.start || incoming.start > incumbent.start && incoming.end >= incumbent.end && incoming.start > incumbent.end)
|
114 | (incoming.start <= incumbent.end || incoming.end < incumbent.end || incoming.start <= incumbent.start) && (incoming.end >= incumbent.start || incoming.end >= incumbent.end || incoming.start > incumbent.start)
|
</code></pre>
Raw Output:
common/src/utils/range_map.rs:114:9:w:
<pre><code>warning: this boolean expression can be simplified
--> common/src/utils/range_map.rs:114:9
|
114 | / (incoming.start <= incumbent.start && incoming.end >= incumbent.end) ||
115 | | (incoming.start <= incumbent.start && incoming.end >= incumbent.start) ||
116 | | (incoming.start <= incumbent.end && incoming.end >= incumbent.end) ||
117 | | (incoming.start > incumbent.start && incoming.end < incumbent.end)
| |______________________________________________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool
= note: `#[warn(clippy::nonminimal_bool)]` on by default
help: try
|
114 | !(incoming.start <= incumbent.start && incoming.end < incumbent.end && incoming.end < incumbent.start || incoming.start > incumbent.start && incoming.end >= incumbent.end && incoming.start > incumbent.end)
|
114 | (incoming.start <= incumbent.end || incoming.end < incumbent.end || incoming.start <= incumbent.start) && (incoming.end >= incumbent.start || incoming.end >= incumbent.end || incoming.start > incumbent.start)
|
</code></pre>
__END__
|
clippy:
common/src/utils/range_map.rs#L114
[clippy] reported by reviewdog 🐶
<pre><code>warning: this boolean expression can be simplified
--> common/src/utils/range_map.rs:114:9
|
114 | / (incoming.start <= incumbent.start && incoming.end >= incumbent.end) ||
115 | | (incoming.start <= incumbent.start && incoming.end >= incumbent.start) ||
| |__________________________________________________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool
help: try
|
114 | !(incoming.start > incumbent.start || incoming.end < incumbent.end && incoming.end < incumbent.start) ||
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
114 | (incoming.end >= incumbent.start || incoming.end >= incumbent.end) && incoming.start <= incumbent.start ||
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
</code></pre>
Raw Output:
common/src/utils/range_map.rs:114:9:w:
<pre><code>warning: this boolean expression can be simplified
--> common/src/utils/range_map.rs:114:9
|
114 | / (incoming.start <= incumbent.start && incoming.end >= incumbent.end) ||
115 | | (incoming.start <= incumbent.start && incoming.end >= incumbent.start) ||
| |__________________________________________________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool
help: try
|
114 | !(incoming.start > incumbent.start || incoming.end < incumbent.end && incoming.end < incumbent.start) ||
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
114 | (incoming.end >= incumbent.start || incoming.end >= incumbent.end) && incoming.start <= incumbent.start ||
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
</code></pre>
__END__
|
clippy:
core/src/decompile/analyzers/yul.rs#L420
[clippy] reported by reviewdog 🐶
<pre><code>warning: you seem to use `.enumerate()` and immediately discard the index
--> core/src/decompile/analyzers/yul.rs:420:23
|
420 | for (_, child) in vm_trace.children.iter().enumerate() {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_enumerate_index
= note: `#[warn(clippy::unused_enumerate_index)]` on by default
help: remove the `.enumerate()` call
|
420 | for child in vm_trace.children.iter() {
| ~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~
</code></pre>
Raw Output:
core/src/decompile/analyzers/yul.rs:420:23:w:
<pre><code>warning: you seem to use `.enumerate()` and immediately discard the index
--> core/src/decompile/analyzers/yul.rs:420:23
|
420 | for (_, child) in vm_trace.children.iter().enumerate() {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_enumerate_index
= note: `#[warn(clippy::unused_enumerate_index)]` on by default
help: remove the `.enumerate()` call
|
420 | for child in vm_trace.children.iter() {
| ~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~
</code></pre>
__END__
|
clippy:
core/src/snapshot/analyze.rs#L534
[clippy] reported by reviewdog 🐶
<pre><code>warning: you seem to use `.enumerate()` and immediately discard the index
--> core/src/snapshot/analyze.rs:534:23
|
534 | for (_, child) in vm_trace.children.iter().enumerate() {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_enumerate_index
help: remove the `.enumerate()` call
|
534 | for child in vm_trace.children.iter() {
| ~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~
</code></pre>
Raw Output:
core/src/snapshot/analyze.rs:534:23:w:
<pre><code>warning: you seem to use `.enumerate()` and immediately discard the index
--> core/src/snapshot/analyze.rs:534:23
|
534 | for (_, child) in vm_trace.children.iter().enumerate() {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_enumerate_index
help: remove the `.enumerate()` call
|
534 | for child in vm_trace.children.iter() {
| ~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~
</code></pre>
__END__
|