diff options
author | Jordan Deitch <jwdeitch@users.noreply.github.com> | 2019-08-01 20:43:05 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-01 20:43:05 -0400 |
commit | 27a2f490b3a88d41606be7fe9c3bc5880e3b55a8 (patch) | |
tree | 0ffddfea691544b9a055750a27b61d537ab88435 | |
parent | 5c6c3750727515fa4fc5bc3bc653293f5293f2c6 (diff) | |
download | milf-rs-27a2f490b3a88d41606be7fe9c3bc5880e3b55a8.tar.gz milf-rs-27a2f490b3a88d41606be7fe9c3bc5880e3b55a8.zip |
convert toml error to std::io error
-rw-r--r-- | src/de.rs | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -1769,6 +1769,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()) } } |