Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(clippy): 1.80 rust clippy list paragraph ident #1661

Merged
merged 1 commit into from
Jul 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions bins/revme/src/cmd/bytecode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,14 @@ impl Cmd {
return;
}
if bytes[0] == 0xEF {
let Ok(eof) = Eof::decode(bytes) else {
eprintln!("Invalid EOF bytecode");
return;
};
println!("Decode: {:#?}", eof);
let res = validate_eof_inner(&eof, None);
println!("Validation: {:#?}", res);
match Eof::decode(bytes) {
Ok(eof) => {
println!("Decoding: {:#?}", eof);
let res = validate_eof_inner(&eof, None);
println!("Validation: {:#?}", res);
}
Err(e) => eprintln!("Decoding Error: {:#?}", e),
}
} else {
print_eof_code(&bytes)
}
Expand Down
2 changes: 1 addition & 1 deletion crates/interpreter/src/gas/calc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ pub const fn selfdestruct_cost(spec_id: SpecId, res: SelfDestructResult) -> u64
/// * Account access gas. after berlin it can be cold or warm.
/// * Transfer value gas. If value is transferred and balance of target account is updated.
/// * If account is not existing and needs to be created. After Spurious dragon
/// this is only accounted if value is transferred.
/// this is only accounted if value is transferred.
#[inline]
pub const fn call_cost(
spec_id: SpecId,
Expand Down
2 changes: 2 additions & 0 deletions crates/precompile/src/bls12_381/pairing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,12 @@ const INPUT_LENGTH: usize = 384;
/// following structure:
/// * 128 bytes of G1 point encoding
/// * 256 bytes of G2 point encoding
///
/// Each point is expected to be in the subgroup of order q.
/// Output is 32 bytes where first 31 bytes are equal to 0x00 and the last byte
/// is 0x01 if pairing result is equal to the multiplicative identity in a pairing
/// target field and 0x00 otherwise.
///
/// See also: <https://eips.ethereum.org/EIPS/eip-2537#abi-for-pairing>
pub(super) fn pairing(input: &Bytes, gas_limit: u64) -> PrecompileResult {
let input_len = input.len();
Expand Down
4 changes: 2 additions & 2 deletions crates/precompile/src/bls12_381/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ pub(super) fn remove_padding(input: &[u8]) -> Result<&[u8; FP_LENGTH], Precompil
///
/// From [EIP-2537](https://eips.ethereum.org/EIPS/eip-2537):
/// * A scalar for the multiplication operation is encoded as 32 bytes by performing BigEndian
/// encoding of the corresponding (unsigned) integer.
/// encoding of the corresponding (unsigned) integer.
///
/// We do not check that the scalar is a canonical Fr element, because the EIP specifies:
/// * The corresponding integer is not required to be less than or equal than main subgroup order
/// `q`.
/// `q`.
pub(super) fn extract_scalar_input(input: &[u8]) -> Result<blst_scalar, PrecompileError> {
if input.len() != SCALAR_LENGTH {
return Err(PrecompileError::Other(format!(
Expand Down
2 changes: 1 addition & 1 deletion crates/revm/src/db/states/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ impl<DB: Database> State<DB> {
/// NOTE: If either:
/// * The [State] has not been built with [StateBuilder::with_bundle_update], or
/// * The [State] has a [TransitionState] set to `None` when
/// [State::merge_transitions] is called,
/// [State::merge_transitions] is called,
///
/// this will panic.
pub fn take_bundle(&mut self) -> BundleState {
Expand Down
Loading