use std::error;
use std::result;
use errors::*;
pub trait StringifyError<T, E: error::Error> {
fn stringify_error(self) -> Result<T>;
}
impl<T, E: error::Error> StringifyError<T, E> for result::Result<T, E> {
fn stringify_error(self) -> Result<T> {
self.map_err(|e| {
let kind: Error = format!("{}", e).into();
kind
})
}
}