diff --git a/src/poller/executor.rs b/src/poller/executor.rs index a6b9109..bc3592f 100644 --- a/src/poller/executor.rs +++ b/src/poller/executor.rs @@ -30,7 +30,7 @@ fn redact_community(community: &str) -> String { if len <= 2 { "**".to_string() } else { - format!("{}***", &community[..2]) + format!("{}**", &community[..2]) } } @@ -253,7 +253,7 @@ mod tests { #[test] fn test_redact_community_normal() { - assert_eq!(redact_community("public"), "pu***"); + assert_eq!(redact_community("public"), "pu**"); } #[test] @@ -269,11 +269,11 @@ mod tests { #[test] fn test_redact_community_three_chars() { - assert_eq!(redact_community("abc"), "ab***"); + assert_eq!(redact_community("abc"), "ab**"); } #[test] fn test_redact_community_long() { - assert_eq!(redact_community("mysecretcommunity"), "my***"); + assert_eq!(redact_community("mysecretcommunity"), "my**"); } } diff --git a/src/websocket_client.rs b/src/websocket_client.rs index f101009..5c30c52 100644 --- a/src/websocket_client.rs +++ b/src/websocket_client.rs @@ -347,7 +347,7 @@ fn redact_community(community: &str) -> String { if len <= 2 { "**".to_string() } else { - format!("{}***", &community[..2]) + format!("{}**", &community[..2]) } } @@ -1039,7 +1039,7 @@ mod tests { #[test] fn test_redact_community_normal() { - assert_eq!(redact_community("public"), "pu***"); + assert_eq!(redact_community("public"), "pu**"); } #[test] @@ -1055,11 +1055,11 @@ mod tests { #[test] fn test_redact_community_three_chars() { - assert_eq!(redact_community("abc"), "ab***"); + assert_eq!(redact_community("abc"), "ab**"); } #[test] fn test_redact_community_long() { - assert_eq!(redact_community("mysecretcommunity"), "my***"); + assert_eq!(redact_community("mysecretcommunity"), "my**"); } }