refactor: simplify to_bytes
1 file changed