Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
error: wrap io::Error in Arc for clone
`ProtoErrorKind` is `Clone`, but the `Io` variant holding `io:Error` runs into trouble with this: since the error can't be cloned we have to reconstruct it and this is a lossy process: resulting in a "simple" `io::Error` that only holds the error type from the parent it was cloned from. This loses important details like the underlying error source/message. This commit changes `ProtoErrorKind::Io` to hold `Arc<io::Error>>` instead. This makes implementing `Clone` trivial - we clone the arc - and no error information is lost.
- Loading branch information