diff options
author | Alex Crichton <alex@alexcrichton.com> | 2019-08-12 15:35:55 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-12 15:35:55 -0500 |
commit | c3a89a690aa34a4225126a40d30e9a0bf1f5a5a5 (patch) | |
tree | 4ee0ae6d0343f7709e62e75d09e82037bc16eefe /src | |
parent | 72881c2a06f9c51377d8a13f7d6bd0be36171b55 (diff) | |
parent | 27a2f490b3a88d41606be7fe9c3bc5880e3b55a8 (diff) | |
download | milf-rs-c3a89a690aa34a4225126a40d30e9a0bf1f5a5a5.tar.gz milf-rs-c3a89a690aa34a4225126a40d30e9a0bf1f5a5a5.zip |
Merge pull request #315 from jwdeitch/master
Allow conversion from de::Error to std::io::error
Diffstat (limited to 'src')
-rw-r--r-- | src/de.rs | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -1823,6 +1823,13 @@ impl Error { #[doc(hidden)] pub fn add_key_context(&mut self, key: &str) { 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) -> () |