Remove fmt dependency

This commit is contained in:
gingerBill
2021-09-29 13:18:06 +01:00
parent 07ba3e6304
commit c22f2866c7
2 changed files with 1 additions and 4 deletions
-2
View File
@@ -17,8 +17,6 @@ Marshal_Error :: union {
io.Error, io.Error,
} }
marshal :: proc(v: any, allocator := context.allocator) -> (data: []byte, err: Marshal_Error) { marshal :: proc(v: any, allocator := context.allocator) -> (data: []byte, err: Marshal_Error) {
b := strings.make_builder(allocator) b := strings.make_builder(allocator)
defer if err != nil || data == nil { defer if err != nil || data == nil {
+1 -2
View File
@@ -1,6 +1,5 @@
package json package json
import "core:fmt"
import "core:mem" import "core:mem"
import "core:math" import "core:math"
import "core:reflect" import "core:reflect"
@@ -306,7 +305,7 @@ unmarsal_value :: proc(p: ^Parser, v: any) -> (err: Unmarshal_Error) {
unmarsal_expect_token :: proc(p: ^Parser, kind: Token_Kind, loc := #caller_location) -> Token { unmarsal_expect_token :: proc(p: ^Parser, kind: Token_Kind, loc := #caller_location) -> Token {
prev := p.curr_token prev := p.curr_token
err := expect_token(p, kind) err := expect_token(p, kind)
fmt.assertf(condition = err == nil, fmt="unmarsal_expect_token: %v, got %v", args={kind, prev.kind}, loc=loc) assert(err == nil, "unmarsal_expect_token")
return prev return prev
} }