Merge pull request #315 from jwdeitch/master
Allow conversion from de::Error to std::io::error
This commit is contained in:
commit
7a11ed691a
|
@ -1825,6 +1825,13 @@ impl Error {
|
|||
self.inner.key.insert(0, key.to_string());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
impl std::convert::From<Error> for std::io::Error {
|
||||
fn from(e: Error) -> Self {
|
||||
return std::io::Error::new(std::io::ErrorKind::InvalidData, e.to_string())
|
||||
}
|
||||
|
||||
fn fix_offset<F>(&mut self, f: F) -> ()
|
||||
where
|
||||
F: FnOnce() -> Option<usize>,
|
||||
|
|
Loading…
Reference in a new issue