authorgravatar for 66840021+Mcrtin@users.noreply.github.comMartin <66840021+Mcrtin@users.noreply.github.com> 2026-10-22 20:18:45+02:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2026-10-24 23:04:11+02:00
log3bb0056d60f64b1d2bfdb029d61c8a107afe212a
tree8b2e0025411fe05c6bf85ce98c5942cfb9e53351
parent735e31ad99bc87621f68dc99806743f64c5128a6

std.http: update usages of `array_list.Managed` to `ArrayList`


1 files changed, 9 insertions(+), 9 deletions(-)

lib/std/http/test.zig+9-9
......@@ -336,17 +336,17 @@ test "Server.Request.respondStreaming non-chunked, unknown content-length" {
336336 const response = try stream_reader.interface.allocRemaining(gpa, .unlimited);
337337 defer gpa.free(response);
338338
339 var expected_response = std.array_list.Managed(u8).init(gpa);
340 defer expected_response.deinit();
339 var expected_response: std.ArrayList(u8) = .empty;
340 defer expected_response.deinit(gpa);
341341
342 try expected_response.appendSlice("HTTP/1.1 200 OK\r\nconnection: close\r\n\r\n");
342 try expected_response.appendSlice(gpa, "HTTP/1.1 200 OK\r\nconnection: close\r\n\r\n");
343343
344344 {
345345 var total: usize = 0;
346346 for (0..500) |i| {
347347 var buf: [30]u8 = undefined;
348348 const line = try std.mem.print(&buf, "{d}, ah ha ha!\n", .{i});
349 try expected_response.appendSlice(line);
349 try expected_response.appendSlice(gpa, line);
350350 total += line.len;
351351 }
352352 try expectEqual(7390, total);
......@@ -411,12 +411,12 @@ test "receiving arbitrary http headers from the client" {
411411 const response = try stream_reader.interface.allocRemaining(gpa, .unlimited);
412412 defer gpa.free(response);
413413
414 var expected_response = std.array_list.Managed(u8).init(gpa);
415 defer expected_response.deinit();
414 var expected_response: std.ArrayList(u8) = .empty;
415 defer expected_response.deinit(gpa);
416416
417 try expected_response.appendSlice("HTTP/1.1 200 OK\r\n");
418 try expected_response.appendSlice("connection: close\r\n");
419 try expected_response.appendSlice("content-length: 0\r\n\r\n");
417 try expected_response.appendSlice(gpa, "HTTP/1.1 200 OK\r\n");
418 try expected_response.appendSlice(gpa, "connection: close\r\n");
419 try expected_response.appendSlice(gpa, "content-length: 0\r\n\r\n");
420420 try expectEqualStrings(expected_response.items, response);
421421}
422422