mirror of
https://github.com/Ed94/Odin.git
synced 2026-07-28 18:30:06 +00:00
Fix -vet and -strict-style failures in tests
This commit is contained in:
@@ -429,7 +429,7 @@ map_with_integer_keys :: proc(t: ^testing.T) {
|
||||
defer delete_map(my_map2)
|
||||
|
||||
unmarshal_err := json.unmarshal(marshaled_data, &my_map2)
|
||||
defer for key, item in my_map2 {
|
||||
defer for _, item in my_map2 {
|
||||
runtime.delete_string(item)
|
||||
}
|
||||
testing.expectf(t, unmarshal_err == nil, "Expected `json.unmarshal` to return nil, got %v", unmarshal_err)
|
||||
|
||||
@@ -241,7 +241,7 @@ doc_to_string :: proc(doc: ^xml.Document) -> (result: string) {
|
||||
written += fmt.wprintf(writer, "[DOCTYPE] %v\n", doc.doctype.ident)
|
||||
|
||||
if len(doc.doctype.rest) > 0 {
|
||||
fmt.wprintf(writer, "\t%v\n", doc.doctype.rest)
|
||||
fmt.wprintf(writer, "\t%v\n", doc.doctype.rest)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -250,10 +250,10 @@ doc_to_string :: proc(doc: ^xml.Document) -> (result: string) {
|
||||
}
|
||||
|
||||
if doc.element_count > 0 {
|
||||
fmt.wprintln(writer, " --- ")
|
||||
print_element(writer, doc, 0)
|
||||
fmt.wprintln(writer, " --- ")
|
||||
}
|
||||
fmt.wprintln(writer, " --- ")
|
||||
print_element(writer, doc, 0)
|
||||
fmt.wprintln(writer, " --- ")
|
||||
}
|
||||
|
||||
return written, .None
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user