5 ms·
Is it really better to remove the error case information from the type signature? Aren't we losing vital information here?
by AxelLuktarGott 2y ago
Is it really better to remove the error case information from the type signature? Aren't we losing vital information here?
- treyd 2y agoThe std::io error type is defined roughly as: type Result<T> = std::result::Result<T, io::Error>; So it's actually fine, since we're specifying it's an IO result. This is a fairly common pattern.