summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--azure-pipelines.yml2
-rw-r--r--tokio-macros/src/lib.rs3
-rw-r--r--tokio/src/time/driver/atomic_stack.rs2
-rw-r--r--tokio/src/time/driver/entry.rs4
-rw-r--r--tokio/src/time/wheel/level.rs2
5 files changed, 8 insertions, 5 deletions
diff --git a/azure-pipelines.yml b/azure-pipelines.yml
index 0e0108e9..4743a66a 100644
--- a/azure-pipelines.yml
+++ b/azure-pipelines.yml
@@ -3,7 +3,7 @@ pr: ["master"]
variables:
RUSTFLAGS: -Dwarnings
- nightly: nightly-2019-11-16
+ nightly: nightly-2020-01-25
jobs:
# Test top level crate
diff --git a/tokio-macros/src/lib.rs b/tokio-macros/src/lib.rs
index 17554470..738923b1 100644
--- a/tokio-macros/src/lib.rs
+++ b/tokio-macros/src/lib.rs
@@ -14,6 +14,9 @@
//! Macros for use with Tokio
+// This `extern` is required for older `rustc` versions but newer `rustc`
+// versions warn about the unused `extern crate`.
+#[allow(unused_extern_crates)]
extern crate proc_macro;
mod entry;
diff --git a/tokio/src/time/driver/atomic_stack.rs b/tokio/src/time/driver/atomic_stack.rs
index 95d78e34..7e5a83fa 100644
--- a/tokio/src/time/driver/atomic_stack.rs
+++ b/tokio/src/time/driver/atomic_stack.rs
@@ -103,7 +103,7 @@ impl Iterator for AtomicStackEntries {
let entry = unsafe { Arc::from_raw(self.ptr) };
// Update `self.ptr` to point to the next element of the stack
- self.ptr = unsafe { (*entry.next_atomic.get()) };
+ self.ptr = unsafe { *entry.next_atomic.get() };
// Unset the queued flag
let res = entry.queued.fetch_and(false, SeqCst);
diff --git a/tokio/src/time/driver/entry.rs b/tokio/src/time/driver/entry.rs
index 079ec7e8..20cc8240 100644
--- a/tokio/src/time/driver/entry.rs
+++ b/tokio/src/time/driver/entry.rs
@@ -143,12 +143,12 @@ impl Entry {
/// The current entry state as known by the timer. This is not the value of
/// `state`, but lets the timer know how to converge its state to `state`.
pub(crate) fn when_internal(&self) -> Option<u64> {
- unsafe { (*self.when.get()) }
+ unsafe { *self.when.get() }
}
pub(crate) fn set_when_internal(&self, when: Option<u64>) {
unsafe {
- (*self.when.get()) = when;
+ *self.when.get() = when;
}
}
diff --git a/tokio/src/time/wheel/level.rs b/tokio/src/time/wheel/level.rs
index 73eab6ce..49f9bfb9 100644
--- a/tokio/src/time/wheel/level.rs
+++ b/tokio/src/time/wheel/level.rs
@@ -217,7 +217,7 @@ impl<T> fmt::Debug for Level<T> {
}
fn occupied_bit(slot: usize) -> u64 {
- (1 << slot)
+ 1 << slot
}
fn slot_range(level: usize) -> u64 {