From 1d6e398f20ad7b692241e325a16c29ea9ff0b393 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Wed, 29 Sep 2021 14:49:58 +0100 Subject: [PATCH] Add `io.Error` to `fmt.fprintf_typeid` --- core/fmt/fmt.odin | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/core/fmt/fmt.odin b/core/fmt/fmt.odin index 7ac2198c0..77b848315 100644 --- a/core/fmt/fmt.odin +++ b/core/fmt/fmt.odin @@ -75,15 +75,13 @@ fprintf :: proc(fd: os.Handle, fmt: string, args: ..any) -> int { w := io.to_writer(os.stream_from_handle(fd)) return wprintf(w, fmt, ..args) } -fprint_type :: proc(fd: os.Handle, info: ^runtime.Type_Info) -> int { +fprint_type :: proc(fd: os.Handle, info: ^runtime.Type_Info) -> (n: int, err: io.Error) { w := io.to_writer(os.stream_from_handle(fd)) - n, _ := wprint_type(w, info) - return n + return wprint_type(w, info) } -fprint_typeid :: proc(fd: os.Handle, id: typeid) -> int { +fprint_typeid :: proc(fd: os.Handle, id: typeid) -> (n: int, err: io.Error) { w := io.to_writer(os.stream_from_handle(fd)) - n, _ := wprint_typeid(w, id) - return n + return wprint_typeid(w, id) } // print* procedures return the number of bytes written