style: drop narrating comments on dot_alpn and ALPN test

Both were restating what the code already said — dot_alpn's doc
narrated the function name and the test comment restated the
assertion. RFC 7858 §3.2 is already cited on self_signed_tls and
build_tls_config where the "why" actually matters.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Razvan Dimescu
2026-04-07 22:56:44 +03:00
parent 1632fc36f2
commit 7d0fe19462

View File

@@ -24,7 +24,6 @@ const WRITE_TIMEOUT: Duration = Duration::from_secs(10);
// buffer would silently truncate anything larger. // buffer would silently truncate anything larger.
const MAX_MSG_LEN: usize = 4096; const MAX_MSG_LEN: usize = 4096;
/// ALPN protocol identifier for DNS-over-TLS (RFC 7858 §3.2).
fn dot_alpn() -> Vec<Vec<u8>> { fn dot_alpn() -> Vec<Vec<u8>> {
vec![b"dot".to_vec()] vec![b"dot".to_vec()]
} }
@@ -462,7 +461,6 @@ mod tests {
async fn dot_negotiates_alpn() { async fn dot_negotiates_alpn() {
let (addr, client_config) = spawn_dot_server().await; let (addr, client_config) = spawn_dot_server().await;
let stream = dot_connect(addr, &client_config).await; let stream = dot_connect(addr, &client_config).await;
// After handshake, the negotiated ALPN protocol should be "dot" (RFC 7858 §3.2).
let (_io, conn) = stream.get_ref(); let (_io, conn) = stream.get_ref();
assert_eq!(conn.alpn_protocol(), Some(&b"dot"[..])); assert_eq!(conn.alpn_protocol(), Some(&b"dot"[..]));
} }