Skip to content

Commit

Permalink
Fix wasm tests
Browse files Browse the repository at this point in the history
  • Loading branch information
stefan-mysten committed Dec 5, 2024
1 parent 4bb63e6 commit b3accde
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions crates/sui-sdk-types/src/types/object.rs
Original file line number Diff line number Diff line change
Expand Up @@ -731,7 +731,10 @@ mod serialization {
}),
) => {
// check id matches in contents
if id_opt(&contents).is_none_or(|id| id != object_id) {
// switch to if id_opt(&contents).is_none_or(|id| id != object_id) when the
// API of is_none_or is stabilized as now this would fail in wasm tests
#[allow(clippy::nonminimal_bool)]
if !id_opt(&contents).is_some_and(|id| id == object_id) {
return Err(serde::de::Error::custom("id from contents doesn't match"));
}

Expand Down Expand Up @@ -890,7 +893,10 @@ mod serialization {
}),
) => {
// check id matches in contents
if id_opt(&contents).is_none_or(|id| id != object_id) {
// switch to if id_opt(&contents).is_none_or(|id| id != object_id) when the
// API of is_none_or is stabilized as now this would fail in wasm tests
#[allow(clippy::nonminimal_bool)]
if !id_opt(&contents).is_some_and(|id| id == object_id) {
return Err(serde::de::Error::custom("id from contents doesn't match"));
}

Expand Down

0 comments on commit b3accde

Please sign in to comment.