encoding/cbor: make temp allocations more explicit

This commit is contained in:
Laytan
2024-03-04 17:26:19 +01:00
committed by Laytan Laats
parent 0076c07076
commit b11d839fb6
5 changed files with 63 additions and 115 deletions
+1 -1
View File
@@ -855,7 +855,7 @@ expect_float :: proc(t: ^testing.T, encoded: string, expected: $T, loc := #calle
buf: bytes.Buffer
stream := bytes.buffer_to_stream(&buf)
encoder := cbor.Encoder{cbor.ENCODE_FULLY_DETERMINISTIC, stream}
encoder := cbor.Encoder{cbor.ENCODE_FULLY_DETERMINISTIC, stream, {}}
expect_encoding :: proc(t: ^testing.T, val: cbor.Value, encoded: string, loc := #caller_location) {
bytes.buffer_reset(&buf)