From 421800ec18e8b1d387fdb35584a58412b706121b Mon Sep 17 00:00:00 2001 From: mnovak Date: Sat, 7 Nov 2026 19:22:40 +0100 Subject: [PATCH] [core] Format: rustfmt on the URL redaction tests --- crates/core/src/validate.rs | 15 ++++++++++++--- crates/core/tests/routes.rs | 4 +++- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/crates/core/src/validate.rs b/crates/core/src/validate.rs index 0a2f6d4..d00e3f3 100644 --- a/crates/core/src/validate.rs +++ b/crates/core/src/validate.rs @@ -801,8 +801,17 @@ mod shown_tests { assert_eq!(shown_url("user:hunter2@host:80"), "\u{2026}@host:80"); assert_eq!(shown_url("http://10.0.0.1:80"), "http://10.0.0.1:80"); assert_eq!(shown_url("http://h/a@b"), "http://\u{2026}@b"); - assert_eq!(shown_url("http://admin:hunter/2@10.0.0.1:80"), "http://\u{2026}@10.0.0.1:80"); - assert_eq!(shown_url("http://admin:hunter?2@10.0.0.1:80"), "http://\u{2026}@10.0.0.1:80"); - assert_eq!(shown_url("http://admin:hunter#2@10.0.0.1:80"), "http://\u{2026}@10.0.0.1:80"); + assert_eq!( + shown_url("http://admin:hunter/2@10.0.0.1:80"), + "http://\u{2026}@10.0.0.1:80" + ); + assert_eq!( + shown_url("http://admin:hunter?2@10.0.0.1:80"), + "http://\u{2026}@10.0.0.1:80" + ); + assert_eq!( + shown_url("http://admin:hunter#2@10.0.0.1:80"), + "http://\u{2026}@10.0.0.1:80" + ); } } diff --git a/crates/core/tests/routes.rs b/crates/core/tests/routes.rs index 4a8e095..de57b3c 100644 --- a/crates/core/tests/routes.rs +++ b/crates/core/tests/routes.rs @@ -264,7 +264,9 @@ fn credentials_with_slash_query_or_hash_are_never_repeated() { "http://admin:hunter#2@10.0.0.1:80", "ftp://admin:hunter2@10.0.0.1", ] { - let errs = errors_for(&format!("hostname = \"app.test\"\nupstreams = [\"{url}\"]\n")); + let errs = errors_for(&format!( + "hostname = \"app.test\"\nupstreams = [\"{url}\"]\n" + )); assert!(!errs.is_empty(), "{url} accepted"); for e in &errs { let all = format!("{e} {:?}", e.params());