Skip to content

Commit bbb595e

Browse files
committed
chore(10027-cheatcode-mutability-tags): mark contains(string,string) cheatcode as pure
1 parent f5afa6c commit bbb595e

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

crates/cheatcodes/assets/cheatcodes.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/cheatcodes/spec/src/vm.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2308,7 +2308,7 @@ interface Vm {
23082308
function indexOf(string calldata input, string calldata key) external pure returns (uint256);
23092309
/// Returns true if `search` is found in `subject`, false otherwise.
23102310
#[cheatcode(group = String)]
2311-
function contains(string calldata subject, string calldata search) external returns (bool result);
2311+
function contains(string calldata subject, string calldata search) external pure returns (bool result);
23122312

23132313
// ======== JSON Parsing and Manipulation ========
23142314

docs/dev/cheatcode-mutability-review.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ From issue [#10027](https://github.com/foundry-rs/foundry/issues/10027):
3232

3333
Mark `pure`:
3434

35-
- [ ] `contains`: `contains(string,string)` _suggested: `pure`_
35+
- [x] `contains`: `contains(string,string)` _suggested: `pure`_
3636

3737
---
3838

0 commit comments

Comments
 (0)