Remove ugly commas
This commit is contained in:
parent
e3e8911d8b
commit
85e2ae3d48
@ -153,7 +153,7 @@ mod tests {
|
|||||||
from_json_value::<LoginInfo>(json!({
|
from_json_value::<LoginInfo>(json!({
|
||||||
"type": "m.login.password",
|
"type": "m.login.password",
|
||||||
"password": "ilovebananas"
|
"password": "ilovebananas"
|
||||||
}),)
|
}))
|
||||||
.unwrap(),
|
.unwrap(),
|
||||||
LoginInfo::Password { password: "ilovebananas".into() }
|
LoginInfo::Password { password: "ilovebananas".into() }
|
||||||
);
|
);
|
||||||
@ -162,7 +162,7 @@ mod tests {
|
|||||||
from_json_value::<LoginInfo>(json!({
|
from_json_value::<LoginInfo>(json!({
|
||||||
"type": "m.login.token",
|
"type": "m.login.token",
|
||||||
"token": "1234567890abcdef"
|
"token": "1234567890abcdef"
|
||||||
}),)
|
}))
|
||||||
.unwrap(),
|
.unwrap(),
|
||||||
LoginInfo::Token { token: "1234567890abcdef".into() }
|
LoginInfo::Token { token: "1234567890abcdef".into() }
|
||||||
);
|
);
|
||||||
|
@ -87,7 +87,7 @@ mod tests {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn invalid_version_characters() {
|
fn invalid_version_characters() {
|
||||||
assert_eq!(ServerKeyId::try_from("ed25519:Abc-1").unwrap_err(), Error::InvalidCharacters,);
|
assert_eq!(ServerKeyId::try_from("ed25519:Abc-1").unwrap_err(), Error::InvalidCharacters);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
@ -60,6 +60,6 @@ mod tests {
|
|||||||
#[test]
|
#[test]
|
||||||
fn test_serialize() {
|
fn test_serialize() {
|
||||||
let test = DurationTest { timeout: Duration::from_millis(7000) };
|
let test = DurationTest { timeout: Duration::from_millis(7000) };
|
||||||
assert_eq!(serde_json::to_value(test).unwrap(), json!({ "timeout": 7 }),);
|
assert_eq!(serde_json::to_value(test).unwrap(), json!({ "timeout": 7 }));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -260,7 +260,7 @@ fn deserialize_nested_struct_with_list() {
|
|||||||
let nested = Nested { item: InnerList { list: vec![1, 2, 3] } };
|
let nested = Nested { item: InnerList { list: vec![1, 2, 3] } };
|
||||||
|
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
urlencoded::from_str(&encoder.append_pair("item", r#"{"list":[1,2,3]}"#).finish(),),
|
urlencoded::from_str(&encoder.append_pair("item", r#"{"list":[1,2,3]}"#).finish()),
|
||||||
Ok(nested)
|
Ok(nested)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -272,7 +272,7 @@ fn deserialize_nested_list_option() {
|
|||||||
|
|
||||||
let nested = Nested { item: InnerList { list: vec![Some(1), Some(2), None] } };
|
let nested = Nested { item: InnerList { list: vec![Some(1), Some(2), None] } };
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
urlencoded::from_str(&encoder.append_pair("item", r#"{"list":[1,2,null]}"#).finish(),),
|
urlencoded::from_str(&encoder.append_pair("item", r#"{"list":[1,2,null]}"#).finish()),
|
||||||
Ok(nested)
|
Ok(nested)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user