You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Do we have other const functions that might be affected by the same problem? I wonder what a long-term solution could be here.
In the issue, you said that the problem is the io::Error in Kind? I tried previously to remove that one because it only appears in certain functions. Perhaps that is worth exploring because most functions don't actually return an io::Error.
If you'd like my opinion, you should impl From<YourErrorType> for std::io::Error, and have io functions return an io::Result, which may be InvalidData with a source = Some(YourErrorType), where YourErrorType is a slimmer Error
(This would be a breaking change.)
((I think that's fine, you're pre 1.0.0, and the API should be allowed to evolve past current limitations))
If you'd like my opinion, you should
impl From<YourErrorType> for std::io::Error
, and have io functions return anio::Result
, which may beInvalidData
with asource = Some(YourErrorType)
, whereYourErrorType
is a slimmerError
(This would be a breaking change.)
((I think that's fine, you're pre 1.0.0, and the API should be allowed to evolve past current limitations))
Originally posted by @aatifsyed in #331 (comment)
The text was updated successfully, but these errors were encountered: