From b28a356cb41077ccee12a9c52f4ef2054e76cac6 Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Fri, 9 Jan 2026 19:58:41 +0000 Subject: chore: cargo fmt --- src/sync/relay_connection.rs | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) (limited to 'src/sync/relay_connection.rs') diff --git a/src/sync/relay_connection.rs b/src/sync/relay_connection.rs index d0090c8..b86d298 100644 --- a/src/sync/relay_connection.rs +++ b/src/sync/relay_connection.rs @@ -526,31 +526,46 @@ mod tests { #[test] fn test_normalize_url_with_wss_scheme() { let url = "wss://relay.example.com"; - assert_eq!(RelayConnection::normalize_url(url), "wss://relay.example.com"); + assert_eq!( + RelayConnection::normalize_url(url), + "wss://relay.example.com" + ); } #[test] fn test_normalize_url_with_ws_scheme() { let url = "ws://relay.example.com"; - assert_eq!(RelayConnection::normalize_url(url), "ws://relay.example.com"); + assert_eq!( + RelayConnection::normalize_url(url), + "ws://relay.example.com" + ); } #[test] fn test_normalize_url_without_scheme() { let url = "relay.example.com"; - assert_eq!(RelayConnection::normalize_url(url), "wss://relay.example.com"); + assert_eq!( + RelayConnection::normalize_url(url), + "wss://relay.example.com" + ); } #[test] fn test_normalize_url_without_scheme_with_port() { let url = "relay.example.com:8080"; - assert_eq!(RelayConnection::normalize_url(url), "wss://relay.example.com:8080"); + assert_eq!( + RelayConnection::normalize_url(url), + "wss://relay.example.com:8080" + ); } #[test] fn test_normalize_url_with_path() { let url = "relay.example.com/nostr"; - assert_eq!(RelayConnection::normalize_url(url), "wss://relay.example.com/nostr"); + assert_eq!( + RelayConnection::normalize_url(url), + "wss://relay.example.com/nostr" + ); } #[test] @@ -587,6 +602,9 @@ mod tests { fn test_normalize_url_real_world_example() { // Test the exact case from the bug report let url = "git.shakespeare.diy"; - assert_eq!(RelayConnection::normalize_url(url), "wss://git.shakespeare.diy"); + assert_eq!( + RelayConnection::normalize_url(url), + "wss://git.shakespeare.diy" + ); } } -- cgit v1.2.3