pub fn redact_url(value: &str) -> StringExpand description
Strip credentials (userinfo) from a URL.
https://user:token@host/path becomes https://[REDACTED]@host/path. The
scheme, host, port, and path are preserved. Values without a scheme://
authority (scp-like git@host:path, bare local paths) are returned
unchanged — they carry no user:secret@ userinfo to leak.