This commit is contained in:
Mateusz Gruszczyński committed 2026-10-31 23:42:58 +01:00
1 parent 2c03fcf248
commit d3b492874b
95 files changed
+1628 -743

No files matched your search

+3 -3
View File
@@ -67,7 +67,7 @@ impl SendfileSlots {
return None;
}
let mut data = vec![0u8; FRAME_LEN];
for chunk in data.chunks_exact_mut(TAG_LEN) {
for chunk in data.as_chunks_mut::<TAG_LEN>().0 {
chunk.copy_from_slice(&tag);
}
registry.slots.push(Slot {
@@ -357,7 +357,7 @@ mod tests {
let (mut socket, slots) = SendfileIo::new(tcp);
for round in 0..2 {
let expected = if round == 0 {
vec![0, 1, 2, 3].repeat(25_000)
[0, 1, 2, 3].repeat(25_000)
} else {
vec![9u8; 100_003]
};
@@ -411,7 +411,7 @@ mod tests {
.unwrap();
server.await.unwrap();
let mut wanted = Vec::new();
for expected in [vec![0, 1, 2, 3].repeat(25_000), vec![9u8; 100_003]] {
for expected in [[0, 1, 2, 3].repeat(25_000), vec![9u8; 100_003]] {
wanted.extend_from_slice(
format!(
"HTTP/1.1 200 OK\r\nContent-Length: {}\r\n\r\n",