(self, path: P)
| 148 | |
| 149 | impl<T> IOErrorToError<T> for std::result::Result<T, std::io::Error> { |
| 150 | fn attach_path_err<P: AsRef<Path>>(self, path: P) -> Result<T> { |
| 151 | return match self { |
| 152 | Ok(v) => Ok(v), |
| 153 | Err(e) => Err(crate::Error::new(ErrorEnum::IoError( |
| 154 | e, |
| 155 | format_path(path.as_ref().to_string_lossy().to_string()), |
| 156 | ))), |
| 157 | }; |
| 158 | } |
| 159 | |
| 160 | fn attach_path_msg<P: AsRef<Path>, M: AsRef<str>>(self, path: P, msg: M) -> Result<T> { |
| 161 | match self { |
no test coverage detected