Skip to content

Commit d843052

Browse files
authored
chore: fix clippy & forge-std external test (#12698)
* chore: fix clippy * bump forge-std * bump solady to pick up fuzz test fix
1 parent fda2b7e commit d843052

File tree

3 files changed

+20
-19
lines changed

3 files changed

+20
-19
lines changed

crates/cheatcodes/src/evm.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,9 +191,8 @@ impl Display for AccountStateDiffs {
191191
for (slot, slot_changes) in &self.state_diff {
192192
match &slot_changes.slot_info {
193193
Some(slot_info) => {
194-
if slot_info.decoded.is_some() {
194+
if let Some(decoded) = &slot_info.decoded {
195195
// Have slot info with decoded values - show decoded values
196-
let decoded = slot_info.decoded.as_ref().unwrap();
197196
writeln!(
198197
f,
199198
"@ {slot} ({}, {}): {} → {}",

crates/cheatcodes/src/test/revert_handlers.rs

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -240,21 +240,23 @@ pub(crate) fn handle_expect_revert(
240240
let decoded_revert = decode_revert(retdata.to_vec());
241241

242242
// Provide more specific error messages based on what was expected
243-
if expected_revert.reverter.is_some() && expected_revert.reason.is_some() {
244-
Err(fmt_err!(
245-
"call reverted with '{}' from {}, but expected 0 reverts with reason '{}' from {}",
246-
stringify(&decoded_revert),
247-
expected_revert.reverted_by.unwrap_or_default(),
248-
stringify(expected_reason.unwrap_or_default()),
249-
expected_revert.reverter.unwrap()
250-
))
251-
} else if expected_revert.reverter.is_some() {
252-
Err(fmt_err!(
253-
"call reverted with '{}' from {}, but expected 0 reverts from {}",
254-
stringify(&decoded_revert),
255-
expected_revert.reverted_by.unwrap_or_default(),
256-
expected_revert.reverter.unwrap()
257-
))
243+
if let Some(reverter) = expected_revert.reverter {
244+
if expected_revert.reason.is_some() {
245+
Err(fmt_err!(
246+
"call reverted with '{}' from {}, but expected 0 reverts with reason '{}' from {}",
247+
stringify(&decoded_revert),
248+
expected_revert.reverted_by.unwrap_or_default(),
249+
stringify(expected_reason.unwrap_or_default()),
250+
reverter
251+
))
252+
} else {
253+
Err(fmt_err!(
254+
"call reverted with '{}' from {}, but expected 0 reverts from {}",
255+
stringify(&decoded_revert),
256+
expected_revert.reverted_by.unwrap_or_default(),
257+
reverter
258+
))
259+
}
258260
} else {
259261
Err(fmt_err!(
260262
"call reverted with '{}' when it was expected not to revert",

crates/forge/tests/cli/ext_integration.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use foundry_test_utils::util::ExtTester;
66
// <https://github.com/foundry-rs/forge-std>
77
#[test]
88
fn forge_std() {
9-
ExtTester::new("foundry-rs", "forge-std", "a6d71da563bbb8d6eef8fbec3a16c61c603d2764")
9+
ExtTester::new("foundry-rs", "forge-std", "b69e66b0ff79924d487d49bf7fb47c9ec326acba")
1010
// Skip fork tests.
1111
.args(["--nmc", "Fork"])
1212
.verbosity(2)
@@ -64,7 +64,7 @@ fn sablier_v2_core() {
6464
// <https://github.com/Vectorized/solady>
6565
#[test]
6666
fn solady() {
67-
ExtTester::new("Vectorized", "solady", "701406e8126cfed931645727b274df303fbcd94d").run();
67+
ExtTester::new("Vectorized", "solady", "fda607f2b8084112cbc0b261c8f6239687b8a15c").run();
6868
}
6969

7070
// <https://github.com/pcaversaccio/snekmate>

0 commit comments

Comments
 (0)