identifiers: Remove unnecessary as_str calls from room_id tests
This commit is contained in:
parent
7474f3e9ef
commit
00ee6030c0
@ -216,9 +216,7 @@ mod tests {
|
|||||||
#[test]
|
#[test]
|
||||||
fn valid_room_id() {
|
fn valid_room_id() {
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
<&RoomId>::try_from("!29fhd83h92h0:example.com")
|
<&RoomId>::try_from("!29fhd83h92h0:example.com").expect("Failed to create RoomId."),
|
||||||
.expect("Failed to create RoomId.")
|
|
||||||
.as_str(),
|
|
||||||
"!29fhd83h92h0:example.com"
|
"!29fhd83h92h0:example.com"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -226,7 +224,7 @@ mod tests {
|
|||||||
#[test]
|
#[test]
|
||||||
fn empty_localpart() {
|
fn empty_localpart() {
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
<&RoomId>::try_from("!:example.com").expect("Failed to create RoomId.").as_str(),
|
<&RoomId>::try_from("!:example.com").expect("Failed to create RoomId."),
|
||||||
"!:example.com"
|
"!:example.com"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -266,9 +264,7 @@ mod tests {
|
|||||||
#[test]
|
#[test]
|
||||||
fn valid_room_id_with_explicit_standard_port() {
|
fn valid_room_id_with_explicit_standard_port() {
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
<&RoomId>::try_from("!29fhd83h92h0:example.com:443")
|
<&RoomId>::try_from("!29fhd83h92h0:example.com:443").expect("Failed to create RoomId."),
|
||||||
.expect("Failed to create RoomId.")
|
|
||||||
.as_str(),
|
|
||||||
"!29fhd83h92h0:example.com:443"
|
"!29fhd83h92h0:example.com:443"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -277,8 +273,7 @@ mod tests {
|
|||||||
fn valid_room_id_with_non_standard_port() {
|
fn valid_room_id_with_non_standard_port() {
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
<&RoomId>::try_from("!29fhd83h92h0:example.com:5000")
|
<&RoomId>::try_from("!29fhd83h92h0:example.com:5000")
|
||||||
.expect("Failed to create RoomId.")
|
.expect("Failed to create RoomId."),
|
||||||
.as_str(),
|
|
||||||
"!29fhd83h92h0:example.com:5000"
|
"!29fhd83h92h0:example.com:5000"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user