Skip to content

Commit 33044f8

Browse files
authored
chore: clippy / fmt (#57)
1 parent 73f8af8 commit 33044f8

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

src/fill/alloy.rs

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ impl Tx for Signed<alloy::consensus::TxLegacy> {
2222
authorization_list,
2323
} = tx_env;
2424
*caller = self.recover_signer().unwrap();
25-
*gas_limit = self.tx().gas_limit as u64;
25+
*gas_limit = self.tx().gas_limit;
2626
*gas_price = U256::from(self.tx().gas_price);
2727
*transact_to = self.tx().to;
2828
*value = self.tx().value;
@@ -55,7 +55,7 @@ impl Tx for Signed<alloy::consensus::TxEip2930> {
5555
authorization_list,
5656
} = tx_env;
5757
*caller = self.recover_signer().unwrap();
58-
*gas_limit = self.tx().gas_limit as u64;
58+
*gas_limit = self.tx().gas_limit;
5959
*gas_price = U256::from(self.tx().gas_price);
6060
*transact_to = self.tx().to;
6161
*value = self.tx().value;
@@ -88,7 +88,7 @@ impl Tx for Signed<alloy::consensus::TxEip1559> {
8888
authorization_list,
8989
} = tx_env;
9090
*caller = self.recover_signer().unwrap();
91-
*gas_limit = self.tx().gas_limit as u64;
91+
*gas_limit = self.tx().gas_limit;
9292
*gas_price = U256::from(self.tx().max_fee_per_gas);
9393
*transact_to = self.tx().to;
9494
*value = self.tx().value;
@@ -121,7 +121,7 @@ impl Tx for Signed<alloy::consensus::TxEip4844> {
121121
authorization_list,
122122
} = tx_env;
123123
*caller = self.recover_signer().unwrap();
124-
*gas_limit = self.tx().gas_limit as u64;
124+
*gas_limit = self.tx().gas_limit;
125125
*gas_price = U256::from(self.tx().max_fee_per_gas);
126126
*transact_to = self.tx().to.into();
127127
*value = self.tx().value;
@@ -154,7 +154,7 @@ impl Tx for Signed<alloy::consensus::TxEip4844WithSidecar> {
154154
authorization_list,
155155
} = tx_env;
156156
*caller = self.recover_signer().unwrap();
157-
*gas_limit = self.tx().tx.gas_limit as u64;
157+
*gas_limit = self.tx().tx.gas_limit;
158158
*gas_price = U256::from(self.tx().tx.max_fee_per_gas);
159159
*transact_to = self.tx().tx.to.into();
160160
*value = self.tx().tx.value;
@@ -191,7 +191,7 @@ impl Tx for Signed<alloy::consensus::TxEip4844Variant> {
191191
alloy::consensus::TxEip4844Variant::TxEip4844WithSidecar(tx) => &tx.tx,
192192
};
193193
*caller = self.recover_signer().unwrap();
194-
*gas_limit = tx.gas_limit as u64;
194+
*gas_limit = tx.gas_limit;
195195
*gas_price = U256::from(tx.max_fee_per_gas);
196196
*transact_to = tx.to.into();
197197
*value = tx.value;
@@ -240,7 +240,7 @@ impl Block for alloy::consensus::Header {
240240
*prevrandao = if self.difficulty.is_zero() { Some(self.mix_hash) } else { None };
241241

242242
if let Some(excess_blob_gas) = self.excess_blob_gas {
243-
block_env.set_blob_excess_gas_and_price(excess_blob_gas as u64);
243+
block_env.set_blob_excess_gas_and_price(excess_blob_gas);
244244
}
245245
}
246246

@@ -268,8 +268,7 @@ impl Block for alloy::rpc::types::eth::Header {
268268
*basefee = U256::from(self.base_fee_per_gas.unwrap_or_default());
269269
*difficulty = U256::from(self.difficulty);
270270
*prevrandao = self.mix_hash;
271-
*blob_excess_gas_and_price =
272-
self.blob_gas_used.map(|ebg| BlobExcessGasAndPrice::new(ebg as u64));
271+
*blob_excess_gas_and_price = self.blob_gas_used.map(BlobExcessGasAndPrice::new);
273272
}
274273
}
275274

0 commit comments

Comments
 (0)