convert toml error to std::io error
This commit is contained in:
parent
45361e70b9
commit
d3eedc52ba
|
@ -1770,6 +1770,13 @@ impl Error {
|
||||||
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())
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl fmt::Display for Error {
|
impl fmt::Display for Error {
|
||||||
|
|
Loading…
Reference in a new issue