Both used the -1 sentinel return; both had no external callers, so the graduation is purely the API-shape change. utf8.runesz uses void for "rune outside legal range"; bufio.readbyte uses void for EOF (empty buffer). The full Hare shapes ((size | invalid) and (u8 | EOF | io::error)) are still richer than this — those richer returns arrive when utf8 grows an explicit invalid type and bufio wires through io::stream's error path.
2.1 KiB
2.1 KiB