Update json literal formatting
This commit is contained in:
parent
8e4ff82a83
commit
f23d7414ec
@ -453,7 +453,8 @@ mod tests {
|
||||
#[test]
|
||||
fn deserialization_structure_mismatch() {
|
||||
// Missing several required fields.
|
||||
let error = from_json_value::<EventJson<StartEventContent>>(json!({"from_device": "123"}))
|
||||
let error =
|
||||
from_json_value::<EventJson<StartEventContent>>(json!({ "from_device": "123" }))
|
||||
.unwrap()
|
||||
.deserialize()
|
||||
.unwrap_err();
|
||||
|
@ -487,7 +487,7 @@ mod tests {
|
||||
fn serialize_contains_display_name_condition() {
|
||||
assert_eq!(
|
||||
to_json_value(&PushCondition::ContainsDisplayName).unwrap(),
|
||||
json!({"kind": "contains_display_name"})
|
||||
json!({ "kind": "contains_display_name" })
|
||||
);
|
||||
}
|
||||
|
||||
@ -540,7 +540,7 @@ mod tests {
|
||||
#[test]
|
||||
fn deserialize_contains_display_name_condition() {
|
||||
assert_matches!(
|
||||
from_json_value::<PushCondition>(json!({"kind": "contains_display_name"})).unwrap(),
|
||||
from_json_value::<PushCondition>(json!({ "kind": "contains_display_name" })).unwrap(),
|
||||
PushCondition::ContainsDisplayName
|
||||
);
|
||||
}
|
||||
|
@ -329,7 +329,7 @@ mod tests {
|
||||
#[test]
|
||||
fn deserialization_failure() {
|
||||
assert!(from_json_value::<EventJson<EncryptedEventContent>>(
|
||||
json!({"algorithm": "m.megolm.v1.aes-sha2"})
|
||||
json!({ "algorithm": "m.megolm.v1.aes-sha2" })
|
||||
)
|
||||
.unwrap()
|
||||
.deserialize()
|
||||
|
@ -222,7 +222,7 @@ mod tests {
|
||||
},
|
||||
"event_id": "$h29iv0s8:example.com",
|
||||
"origin_server_ts": 1,
|
||||
"prev_content": {"name": "The old name"},
|
||||
"prev_content": { "name": "The old name" },
|
||||
"room_id": "!n8f893n9:example.com",
|
||||
"sender": "@carl:example.com",
|
||||
"state_key": "",
|
||||
|
@ -351,7 +351,7 @@ mod tests {
|
||||
"type": "m.room.name",
|
||||
"state_key": "",
|
||||
"sender": "@example:localhost",
|
||||
"content": {"name": "Ruma"}
|
||||
"content": { "name": "Ruma" }
|
||||
});
|
||||
|
||||
let join_rules_event = json!({
|
||||
|
Loading…
x
Reference in New Issue
Block a user