aboutsummaryrefslogtreecommitdiff
path: root/src/error.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2020-12-02 20:12:24 +0100
committerAlex Auvolat <alex@adnab.me>2020-12-02 20:12:24 +0100
commit14d34e76f4007e50af89bd47f6ad36f45494c50a (patch)
treed1a79d397b26f9500917ef5e4eaa6ae70b2d1429 /src/error.rs
parent46fae5d138cb7c0a74e2a8c7837541f18400ccf4 (diff)
downloadnetapp-14d34e76f4007e50af89bd47f6ad36f45494c50a.tar.gz
netapp-14d34e76f4007e50af89bd47f6ad36f45494c50a.zip
Documentate
Diffstat (limited to 'src/error.rs')
-rw-r--r--src/error.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/error.rs b/src/error.rs
index b54423a..44a3d50 100644
--- a/src/error.rs
+++ b/src/error.rs
@@ -41,6 +41,8 @@ impl<T> From<tokio::sync::mpsc::error::SendError<T>> for Error {
}
}
+/// Ths trait adds a `.log_err()` method on `Result<(), E>` types,
+/// which dismisses the error by logging it to stderr.
pub trait LogError {
fn log_err(self, msg: &'static str);
}