convert toml error to std::io error
This commit is contained in:
parent
45361e70b9
commit
d3eedc52ba
|
@ -1769,6 +1769,13 @@ impl Error {
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
pub fn add_key_context(&mut self, key: &str) {
|
pub fn add_key_context(&mut self, key: &str) {
|
||||||
self.inner.key.insert(0, key.to_string());
|
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())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue