From 536fae523e0885e139a5c204e65cd434252b5f68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Commaille?= Date: Sun, 12 Jun 2022 10:24:21 +0200 Subject: [PATCH] identifiers: Make more test assertions more helpful --- crates/ruma-common/src/identifiers/matrix_uri.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/ruma-common/src/identifiers/matrix_uri.rs b/crates/ruma-common/src/identifiers/matrix_uri.rs index 1620a212..4135d957 100644 --- a/crates/ruma-common/src/identifiers/matrix_uri.rs +++ b/crates/ruma-common/src/identifiers/matrix_uri.rs @@ -682,7 +682,7 @@ mod tests { MatrixToUri::parse("https://matrix.to/#/%21ruma%3Anotareal.hs?via=notareal.hs") .expect("Failed to create MatrixToUri."); assert_eq!(matrix_to.id(), &room_id!("!ruma:notareal.hs").into()); - assert_eq!(matrix_to.via(), &vec![server_name!("notareal.hs").to_owned()]); + assert_eq!(matrix_to.via(), &[server_name!("notareal.hs").to_owned()]); let matrix_to = MatrixToUri::parse("https://matrix.to/#/%23ruma%3Anotareal.hs/%24event%3Anotareal.hs") @@ -699,7 +699,7 @@ mod tests { matrix_to.id(), &(room_id!("!ruma:notareal.hs"), event_id!("$event:notareal.hs")).into() ); - assert!(matrix_to.via().is_empty()); + assert_eq!(matrix_to.via().len(), 0); } #[test]