diff --git a/actix-rt/src/runtime.rs b/actix-rt/src/runtime.rs index e5269141..d98f85da 100644 --- a/actix-rt/src/runtime.rs +++ b/actix-rt/src/runtime.rs @@ -41,7 +41,7 @@ impl Error for RunError { self.inner.description() } fn cause(&self) -> Option<&Error> { - self.inner.cause() + self.inner.source() } } diff --git a/actix-rt/src/system.rs b/actix-rt/src/system.rs index 7fe31448..aaf15c7c 100644 --- a/actix-rt/src/system.rs +++ b/actix-rt/src/system.rs @@ -1,13 +1,13 @@ use std::cell::RefCell; use std::io; -use std::sync::atomic::{AtomicUsize, Ordering, ATOMIC_USIZE_INIT}; +use std::sync::atomic::{AtomicUsize, Ordering}; use futures::sync::mpsc::UnboundedSender; use crate::arbiter::{Arbiter, SystemCommand}; use crate::builder::{Builder, SystemRunner}; -static SYSTEM_COUNT: AtomicUsize = ATOMIC_USIZE_INIT; +static SYSTEM_COUNT: AtomicUsize = AtomicUsize::new(0); /// System is a runtime manager. #[derive(Clone, Debug)]