Zig 0.17.0-dev (Split by item)

This is an example of documentation generated by ZigDoc, an alternative to Zig's built-in Auto Doc feature. See also examples in other modes/formats. The project being documented here (as the example) is the Zig library itself.

updateSource

fuzz.updateSource
fn updateSource() error

File

lib/build-web/fuzz.zig:342

Code

fn updateSource() error{OutOfMemory}!void {
    if (recent_coverage_update.items.len == 0) return;
    const file_sli = selected_source_location.?;
    var html: std.ArrayList(u8) = .empty;
    defer html.deinit(gpa);
    file_sli.fileHtml(&html) catch |err| switch (err) {
        error.OutOfMemory => |e| return e,
        error.SourceUnavailable => {},
    };
    js.updateSource(html.items.ptr, html.items.len);
}