summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTaiki Endo <te316e89@gmail.com>2019-01-03 07:12:11 +0900
committerCarl Lerche <me@carllerche.com>2019-01-02 14:12:11 -0800
commit9a8d087c69fbc9fcf6c32481297de14a333d114c (patch)
treebedcbda40f3c8ac209ccef55458fa7a7c929ee7c /src
parent30f59670c8c2843fe6852b37e0637b0d52eb9ada (diff)
Allow deprecated Error::cause (#818)
Error::cause is deprecated in Rust 1.33, but this allows Error::cause until the minimum supported version of tokio is Rust 1.30. When the minimum support version of tokio reaches Rust 1.30, replace Error::cause with Error::source. Fixes: #817
Diffstat (limited to 'src')
-rw-r--r--src/runtime/current_thread/runtime.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/runtime/current_thread/runtime.rs b/src/runtime/current_thread/runtime.rs
index 262cb1e7..6bb2b076 100644
--- a/src/runtime/current_thread/runtime.rs
+++ b/src/runtime/current_thread/runtime.rs
@@ -92,6 +92,10 @@ impl Error for RunError {
fn description(&self) -> &str {
self.inner.description()
}
+
+ // FIXME(taiki-e): When the minimum support version of tokio reaches Rust 1.30,
+ // replace this with Error::source.
+ #[allow(deprecated)]
fn cause(&self) -> Option<&Error> {
self.inner.cause()
}