mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-10-28 10:45:48 +08:00
Remove usages of array_list.Managed in docs/wasm/markdown
This commit is contained in:
1 parent
b5ed0ae2ce
commit
1c26a0e8dd
2 files changed
+5
-5
No files matched your search
@@ -1119,9 +1119,9 @@ fn testRender(input: []const u8, expected: []const u8) !void {
|
||||
var doc = try parser.endInput();
|
||||
defer doc.deinit(testing.allocator);
|
||||
|
||||
var actual = std.array_list.Managed(u8).init(testing.allocator);
|
||||
var actual: std.Io.Writer.Allocating = .init(testing.allocator);
|
||||
defer actual.deinit();
|
||||
try doc.render(actual.writer());
|
||||
try doc.render(&actual.writer);
|
||||
|
||||
try testing.expectEqualStrings(expected, actual.items);
|
||||
try testing.expectEqualStrings(expected, actual.written());
|
||||
}
|
||||
@@ -160,8 +160,8 @@ pub fn deinit(doc: *Document, allocator: Allocator) void {
|
||||
}
|
||||
|
||||
/// Renders a document directly to a writer using the default renderer.
|
||||
pub fn render(doc: Document, writer: anytype) @TypeOf(writer).Error!void {
|
||||
const renderer: Renderer(@TypeOf(writer), void) = .{ .context = {} };
|
||||
pub fn render(doc: Document, writer: *std.Io.Writer) std.Io.Writer.Error!void {
|
||||
const renderer: Renderer(void) = .{ .context = {} };
|
||||
try renderer.render(doc, writer);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user