Skip to content

feat: add eip4844 fields to rpc transaction

Sign in for the full log view
GitHub Actions / clippy failed Aug 31, 2023 in 0s

clippy

1 error

Details

Results

Message level Amount
Internal compiler error 0
Error 1
Warning 0
Note 0
Help 0

Versions

  • rustc 1.74.0-nightly (84a9f4c6e 2023-08-29)
  • cargo 1.74.0-nightly (925280f02 2023-08-25)
  • clippy 0.1.74 (84a9f4c 2023-08-29)

Annotations

Check failure on line 131 in crates/rpc/rpc-types-compat/src/transaction/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

borrow of moved value: `tx`

error[E0382]: borrow of moved value: `tx`
    --> crates/rpc/rpc-types-compat/src/transaction/mod.rs:131:31
     |
34   |     tx: TransactionSignedEcRecovered,
     |     -- move occurs because `tx` has type `reth_primitives::TransactionSignedEcRecovered`, which does not implement the `Copy` trait
...
41   |     let mut signed_tx = tx.into_signed();
     |                            ------------- `tx` moved due to this method call
...
131  |         max_fee_per_blob_gas: tx.transaction.max_fee_per_blob_gas().map(U128::from),
     |                               ^^^^^^^^^^^^^^ value borrowed here after move
     |
note: `reth_primitives::TransactionSignedEcRecovered::into_signed` takes ownership of the receiver `self`, which moves `tx`
    --> /home/runner/work/reth/reth/crates/primitives/src/transaction/mod.rs:1106:24
     |
1106 |     pub fn into_signed(self) -> TransactionSigned {
     |                        ^^^^
     = note: borrow occurs due to deref coercion to `reth_primitives::TransactionSigned`
note: deref defined here
    --> /home/runner/work/reth/reth/crates/primitives/src/transaction/mod.rs:1087:52
     |
1087 | #[derive(Debug, Clone, PartialEq, Eq, Hash, AsRef, Deref, Default)]
     |                                                    ^^^^^
     = note: this error originates in the derive macro `Deref` (in Nightly builds, run with -Z macro-backtrace for more info)
help: you can `clone` the value and consume it, but this might not be your desired behavior
     |
41   |     let mut signed_tx = tx.clone().into_signed();
     |                           ++++++++