fix: use correct error type for cbor.writeErrorSet
This commit is contained in:
parent
a1040f0b5c
commit
71367c963b
1 changed files with 1 additions and 3 deletions
|
@ -152,9 +152,7 @@ fn writeNull(writer: anytype) @TypeOf(writer).Error!void {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn writeErrorset(writer: anytype, err: anyerror) @TypeOf(writer).Error!void {
|
fn writeErrorset(writer: anytype, err: anyerror) @TypeOf(writer).Error!void {
|
||||||
var buf: [256]u8 = undefined;
|
try writer.print("error.{s}", .{@errorName(err)});
|
||||||
const errmsg = try bufPrint(&buf, "error.{s}", .{@errorName(err)});
|
|
||||||
return writeString(writer, errmsg);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn writeValue(writer: anytype, value: anytype) @TypeOf(writer).Error!void {
|
pub fn writeValue(writer: anytype, value: anytype) @TypeOf(writer).Error!void {
|
||||||
|
|
Loading…
Add table
Reference in a new issue