3 ms·Throw an exception proving the point of the article even furtherby tcfhgj 2y agoThrow an exception proving the point of the article even furtherwtetzner 2y agoYou would actually use a Result type: use std::io; pub fn read(path: Path) -> io::Result<Bytes> { File::open(path)?.read_to_end() }tcfhgj 2y agoSure, if you are allowed to change the signature, makes it look more ugly than just returning Bytes though