aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/de.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/de.rs b/src/de.rs
index 0b7b2cc..89b67d9 100644
--- a/src/de.rs
+++ b/src/de.rs
@@ -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) -> ()