Skip to content

Commit

Permalink
chore(l2): forbid expects (#1289)
Browse files Browse the repository at this point in the history
**Motivation**

We should not be using `.expect()` and use Errors instead.

**Description**

* `expect_used = "deny"` was added to `Cargo.toml` to throw clippy
errors on expects.
* `.expect()` usage was replaced with errors

Closes  #1267
  • Loading branch information
dsocolobsky authored Nov 28, 2024
1 parent b930c83 commit d74aeff
Show file tree
Hide file tree
Showing 16 changed files with 272 additions and 170 deletions.
1 change: 1 addition & 0 deletions crates/l2/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,4 @@ path = "./l2.rs"

[lints.clippy]
unwrap_used = "deny"
expect_used = "deny"
1 change: 1 addition & 0 deletions crates/l2/clippy.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
allow-unwrap-in-tests = true
1 change: 1 addition & 0 deletions crates/l2/contracts/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,4 @@ path = "./deployer.rs"

[lints.clippy]
unwrap_used = "deny"
expect_used = "deny"
Loading

0 comments on commit d74aeff

Please sign in to comment.