mirror of
https://github.com/odin-lang/Odin.git
synced 2026-04-27 08:43:55 +00:00
Remove fmt dependency
This commit is contained in:
@@ -17,8 +17,6 @@ Marshal_Error :: union {
|
||||
io.Error,
|
||||
}
|
||||
|
||||
|
||||
|
||||
marshal :: proc(v: any, allocator := context.allocator) -> (data: []byte, err: Marshal_Error) {
|
||||
b := strings.make_builder(allocator)
|
||||
defer if err != nil || data == nil {
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package json
|
||||
|
||||
import "core:fmt"
|
||||
import "core:mem"
|
||||
import "core:math"
|
||||
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 {
|
||||
prev := p.curr_token
|
||||
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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user