[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 -6
View File
@@ -111,12 +111,8 @@ pub(crate) fn hex_decode(what: &'static str, s: &str) -> Result<Vec<u8>> {
return Err(malformed(what));
}
let mut out = Vec::with_capacity(b.len() / 2);
for pair in b.chunks_exact(2) {
let (hi, lo) = match pair {
[h, l] => (hex_digit(*h), hex_digit(*l)),
_ => (None, None),
};
match (hi, lo) {
for [h, l] in b.as_chunks::<2>().0 {
match (hex_digit(*h), hex_digit(*l)) {
(Some(h), Some(l)) => out.push((h << 4) | l),
_ => return Err(malformed(what)),
}