Skip to content

Commit 6c602d1

Browse files
authored
Merge pull request #2444 from Fallengirl/main
Use contains instead of any in compatibility check
2 parents 56157cf + 9ffe156 commit 6c602d1

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

packages/vm/src/compatibility.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -175,10 +175,7 @@ fn check_interface_version(module: &ParsedWasm) -> VmResult<()> {
175175
} else {
176176
// Exactly one interface version found
177177
let version_str = first_interface_version_export.as_str();
178-
if SUPPORTED_INTERFACE_VERSIONS
179-
.iter()
180-
.any(|&v| v == version_str)
181-
{
178+
if SUPPORTED_INTERFACE_VERSIONS.contains(&version_str) {
182179
Ok(())
183180
} else {
184181
Err(VmError::static_validation_err(

0 commit comments

Comments
 (0)