diff --git a/crates/ruma-common/src/events/policy/rule/room.rs b/crates/ruma-common/src/events/policy/rule/room.rs index 0150b8d5..8150b874 100644 --- a/crates/ruma-common/src/events/policy/rule/room.rs +++ b/crates/ruma-common/src/events/policy/rule/room.rs @@ -87,9 +87,6 @@ mod tests { } }); - assert!(from_json_value::>(json) - .unwrap() - .deserialize() - .is_ok()); + from_json_value::>(json).unwrap().deserialize().unwrap(); } } diff --git a/crates/ruma-common/src/events/push_rules.rs b/crates/ruma-common/src/events/push_rules.rs index eaace8e9..ad667d44 100644 --- a/crates/ruma-common/src/events/push_rules.rs +++ b/crates/ruma-common/src/events/push_rules.rs @@ -235,6 +235,6 @@ mod tests { "type": "m.push_rules" }); - assert!(from_json_value::(json_data).is_ok()); + from_json_value::(json_data).unwrap(); } } diff --git a/crates/ruma-common/src/events/room/encrypted.rs b/crates/ruma-common/src/events/room/encrypted.rs index bedf3edf..16cc0f36 100644 --- a/crates/ruma-common/src/events/room/encrypted.rs +++ b/crates/ruma-common/src/events/room/encrypted.rs @@ -411,11 +411,11 @@ mod tests { #[test] fn deserialization_failure() { - assert!(from_json_value::>( - json!({ "algorithm": "m.megolm.v1.aes-sha2" }) + from_json_value::>( + json!({ "algorithm": "m.megolm.v1.aes-sha2" }), ) .unwrap() .deserialize() - .is_err()); + .unwrap_err(); } }