authorgravatar for 124872+jedisct1@users.noreply.github.comFrank Denis <124872+jedisct1@users.noreply.github.com> 2026-05-03 17:29:03+02:00
committergravatar for 124872+jedisct1@users.noreply.github.comFrank Denis <124872+jedisct1@users.noreply.github.com> 2026-05-28 16:28:27+02:00
log87e0dc7dea6153d7b34c3b8d626316ca7d5ce787
tree66a142ac90c9a230ea1d57f580379b34aa73fecb
parent3f1dead2fc5922b588fbfb108f421ca957d6934a

std.crypto.codecs.asn1.Oid: align toDot with the new Writer API

Take a *std.Io.Writer instead of an anytype writer, and read the test output via stream.buffered() now that .written() is gone.

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

lib/std/crypto/codecs/asn1/Oid.zig+2-2
......@@ -47,7 +47,7 @@ test fromDot {
4747 }
4848}
4949
50pub fn toDot(self: Oid, writer: anytype) @TypeOf(writer).Error!void {
50pub fn toDot(self: Oid, writer: *std.Io.Writer) std.Io.Writer.Error!void {
5151 const encoded = self.encoded;
5252 const first = @divTrunc(encoded[0], 40);
5353 const second = encoded[0] - first * 40;
......@@ -81,7 +81,7 @@ test toDot {
8181 for (test_cases) |t| {
8282 var stream: std.Io.Writer = .fixed(&buf);
8383 try toDot(Oid{ .encoded = t.encoded }, &stream);
84 try std.testing.expectEqualStrings(t.dot_notation, stream.written());
84 try std.testing.expectEqualStrings(t.dot_notation, stream.buffered());
8585 }
8686}
8787