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 unwrap #1290

Merged
merged 20 commits into from
Nov 27, 2024
Merged

Conversation

LeanSerra
Copy link
Contributor

Motivation

Remove all the unwraps from the l2 module

Description

  • Add "unwrap_used = "deny" to all cargo.toml files
  • Add allow-unwrap-in-tests = true to clippy.toml
  • Add new error types or use existing ones when possible.
  • Remove all unwraps, change functions to return Result<T, E>, panic and log when errors are unrecovereable

Closes #1266

@LeanSerra LeanSerra changed the title Feat(L2): forbid unwrap feat(L2): forbid unwrap Nov 26, 2024
@LeanSerra LeanSerra changed the title feat(L2): forbid unwrap chore(l2): forbid unwrap Nov 26, 2024
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. When it's ready, i will give it another look.

crates/l2/proposer/mod.rs Outdated Show resolved Hide resolved
@LeanSerra LeanSerra marked this pull request as ready for review November 27, 2024 17:56
@LeanSerra LeanSerra requested a review from a team as a code owner November 27, 2024 17:56
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.

LGTM, left 2 simple comments.

crates/l2/contracts/deployer.rs Outdated Show resolved Hide resolved
@fborello-lambda fborello-lambda added this pull request to the merge queue Nov 27, 2024
Merged via the queue into lambdaclass:main with commit 745823b Nov 27, 2024
8 checks passed
@LeanSerra LeanSerra deleted the l2/forbid_unwrap branch November 27, 2024 20:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

L2: Forbid unwraps
3 participants