for loop asthetics

This commit is contained in:
Emil Lerch 2023-06-11 11:32:37 -07:00
parent 8c86f3c7d4
commit 94342c83ef
Signed by: lobo
GPG Key ID: A7B62D657EF764F8

View File

@ -552,9 +552,7 @@ fn writeToTestBuffers(response: []const u8, res: *std.http.Server.Response) void
const errmsg = "response exceeds 1024 bytes";
const src = if (response.len < 1024) response else errmsg;
test_resp_buf_len = if (response.len < 1024) response.len else errmsg.len;
for (src, 0..) |b, i| {
test_resp_buf[i] = b;
}
for (src, 0..) |b, i| test_resp_buf[i] = b;
for (test_resp_buf_len..1024) |i| test_resp_buf[i] = 0;
}
fn testRequest(request_bytes: []const u8) !void {