We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Error
Display
AppErrToStdErr
1 parent 0ab67f1 commit d25795eCopy full SHA for d25795e
src/util/errors.rs
@@ -253,17 +253,10 @@ pub fn internal<S: ToString + ?Sized>(error: &S) -> Box<dyn AppError> {
253
})
254
}
255
256
-#[derive(Debug)]
+#[derive(Debug, thiserror::Error)]
257
+#[error("{0}")]
258
struct AppErrToStdErr(pub Box<dyn AppError>);
259
-impl Error for AppErrToStdErr {}
260
-
261
-impl fmt::Display for AppErrToStdErr {
262
- fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
263
- self.0.fmt(f)
264
- }
265
-}
266
267
pub(crate) fn std_error(e: Box<dyn AppError>) -> Box<dyn Error + Send> {
268
Box::new(AppErrToStdErr(e))
269
0 commit comments