(bytes: &[u8])
| 733 | } |
| 734 | |
| 735 | fn newline_normalized(bytes: &[u8]) -> Vec<u8> { |
| 736 | let mut normalized = Vec::with_capacity(bytes.len()); |
| 737 | let mut index = 0; |
| 738 | while index < bytes.len() { |
| 739 | if bytes[index..].starts_with(b"\r\n") { |
| 740 | normalized.push(b'\n'); |
| 741 | index += 2; |
| 742 | } else { |
| 743 | normalized.push(bytes[index]); |
| 744 | index += 1; |
| 745 | } |
| 746 | } |
| 747 | normalized |
| 748 | } |
| 749 | |
| 750 | fn format_bytes(bytes: &[u8]) -> String { |
| 751 | const HEX: &[u8; 16] = b"0123456789abcdef"; |
no test coverage detected