rune
rune copied to clipboard
Use Result in reader.rs
Currently the reader has a defined type for errors, but it is stored as part of the Token enum. This is not idiomatic Rust. A better way to handle this would be to have the reader functions return a Result<Token, Error>
. This would let us take advantage of the try operator (?
) and have more idiomatic code.