[domistream] WIP: rustfmt, doc link, clippy fixes (one collapsible-if left in rtsp/mod.rs), PROTOCOL.md status

Paused at Mark's request.
This commit is contained in:
2026-11-25 14:32:37 +01:00
parent 30a7b90034
commit bd91a1007e
14 changed files with 68 additions and 57 deletions
+2 -4
View File
@@ -271,10 +271,8 @@ impl ServerCert {
const END: &[u8] = b"-----END CERTIFICATE-----";
cap("host certificate PEM", MAX_CERT_PEM_BYTES, pem.len())?;
let trimmed = pem.trim_ascii();
let body = trimmed
.strip_prefix(BEGIN)
.and_then(|b| b.strip_suffix(END))
.ok_or(malformed("host certificate PEM"))?;
let body =
trimmed.strip_prefix(BEGIN).and_then(|b| b.strip_suffix(END)).ok_or(malformed("host certificate PEM"))?;
if body.windows(5).any(|w| w == b"-----") {
return Err(malformed("host certificate PEM holds more than one block"));
}