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(l2): forbid as conversions #1347

Merged
merged 19 commits into from
Dec 2, 2024
Merged

chore(l2): forbid as conversions #1347

merged 19 commits into from
Dec 2, 2024

Conversation

LeanSerra
Copy link
Contributor

Motivation

  • This PR aims to remove all as conversions from the l2 code

Description

  • This PR removes all type conversions using as and changes them to use either into(), try_into() or refactors to avoid having to convert
  • Some type conversions from enum to numeric types are removed by implementing the trait From

Closes #1268

@LeanSerra LeanSerra self-assigned this Nov 28, 2024
@LeanSerra LeanSerra force-pushed the l2/remove_as branch 2 times, most recently from 3f3f1fd to fd0d674 Compare November 29, 2024 15:03
@LeanSerra LeanSerra marked this pull request as ready for review November 29, 2024 15:21
@LeanSerra LeanSerra requested a review from a team as a code owner November 29, 2024 15:21
Copy link
Contributor

@fborello-lambda fborello-lambda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks Good, left some suggestions

crates/l2/utils/eth_client/mod.rs Outdated Show resolved Hide resolved
crates/l2/utils/eth_client/mod.rs Outdated Show resolved Hide resolved
crates/l2/utils/eth_client/mod.rs Outdated Show resolved Hide resolved
crates/l2/proposer/l1_committer.rs Show resolved Hide resolved
LeanSerra and others added 6 commits December 2, 2024 11:21
Co-authored-by: Federico Borello <156438142+fborello-lambda@users.noreply.github.com>
Co-authored-by: Federico Borello <156438142+fborello-lambda@users.noreply.github.com>
Co-authored-by: Federico Borello <156438142+fborello-lambda@users.noreply.github.com>
Co-authored-by: Federico Borello <156438142+fborello-lambda@users.noreply.github.com>
@jrchatruc jrchatruc added this pull request to the merge queue Dec 2, 2024
Merged via the queue into main with commit 2069826 Dec 2, 2024
17 checks passed
@jrchatruc jrchatruc deleted the l2/remove_as branch December 2, 2024 21:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

L2: Remove as conversions
3 participants