mirror of
https://github.com/lightpanda-io/browser.git
synced 2026-03-22 12:44:43 +00:00
cdp: explain buffer size for int serialization
This commit is contained in:
@@ -230,6 +230,7 @@ pub const Writer = struct {
|
||||
switch (value) {
|
||||
.integer => |v| {
|
||||
// CDP spec requires integer values to be serialized as strings.
|
||||
// 20 bytes is enough for the decimal representation of a 64-bit integer.
|
||||
var buf: [20]u8 = undefined;
|
||||
const s = try std.fmt.bufPrint(&buf, "{d}", .{v});
|
||||
try w.write(s);
|
||||
|
||||
Reference in New Issue
Block a user