From dcfa895b512e3ed522b81b18baf3e33fd78a600c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Linus=20F=C3=A4rnstrand?= Date: Mon, 6 Jan 2020 19:04:21 +0100 Subject: chore: use just std instead of ::std in paths (#2049) --- tokio/src/io/split.rs | 2 +- tokio/src/net/unix/ucred.rs | 5 +---- tokio/src/runtime/enter.rs | 2 +- tokio/src/runtime/mod.rs | 2 +- tokio/src/sync/mpsc/error.rs | 2 +- tokio/src/sync/oneshot.rs | 4 ++-- tokio/src/sync/semaphore_ll.rs | 4 ++-- tokio/src/sync/watch.rs | 2 +- tokio/tests/rt_common.rs | 2 +- tokio/tests/sync_errors.rs | 2 +- 10 files changed, 12 insertions(+), 15 deletions(-) (limited to 'tokio') diff --git a/tokio/src/io/split.rs b/tokio/src/io/split.rs index a01ceef2..50cd498c 100644 --- a/tokio/src/io/split.rs +++ b/tokio/src/io/split.rs @@ -139,7 +139,7 @@ impl Inner { } else { // Spin... but investigate a better strategy - ::std::thread::yield_now(); + std::thread::yield_now(); cx.waker().wake_by_ref(); Poll::Pending diff --git a/tokio/src/net/unix/ucred.rs b/tokio/src/net/unix/ucred.rs index ccdf640b..cdd77ea4 100644 --- a/tokio/src/net/unix/ucred.rs +++ b/tokio/src/net/unix/ucred.rs @@ -125,10 +125,7 @@ pub(crate) mod impl_solaris { fn ucred_geteuid(cred: *const ucred_t) -> super::uid_t; fn ucred_getegid(cred: *const ucred_t) -> super::gid_t; - fn getpeerucred( - fd: ::std::os::raw::c_int, - cred: *mut *mut ucred_t, - ) -> ::std::os::raw::c_int; + fn getpeerucred(fd: std::os::raw::c_int, cred: *mut *mut ucred_t) -> std::os::raw::c_int; } pub(crate) fn get_peer_cred(sock: &UnixStream) -> io::Result { diff --git a/tokio/src/runtime/enter.rs b/tokio/src/runtime/enter.rs index 35bb3581..bada8e7b 100644 --- a/tokio/src/runtime/enter.rs +++ b/tokio/src/runtime/enter.rs @@ -63,7 +63,7 @@ pub(crate) fn exit R, R>(f: F) -> R { let reset = Reset; let ret = f(); - ::std::mem::forget(reset); + std::mem::forget(reset); ENTERED.with(|c| { assert!(!c.get(), "closure claimed permanent executor"); diff --git a/tokio/src/runtime/mod.rs b/tokio/src/runtime/mod.rs index 54524a91..6b857482 100644 --- a/tokio/src/runtime/mod.rs +++ b/tokio/src/runtime/mod.rs @@ -294,7 +294,7 @@ enum Kind { } /// After thread starts / before thread stops -type Callback = ::std::sync::Arc; +type Callback = std::sync::Arc; impl Runtime { /// Create a new runtime instance with default configuration values. diff --git a/tokio/src/sync/mpsc/error.rs b/tokio/src/sync/mpsc/error.rs index 4b8d9054..bc1f6465 100644 --- a/tokio/src/sync/mpsc/error.rs +++ b/tokio/src/sync/mpsc/error.rs @@ -13,7 +13,7 @@ impl fmt::Display for SendError { } } -impl ::std::error::Error for SendError {} +impl std::error::Error for SendError {} // ===== TrySendError ===== diff --git a/tokio/src/sync/oneshot.rs b/tokio/src/sync/oneshot.rs index 67094645..7b8ab355 100644 --- a/tokio/src/sync/oneshot.rs +++ b/tokio/src/sync/oneshot.rs @@ -57,7 +57,7 @@ pub mod error { } } - impl ::std::error::Error for RecvError {} + impl std::error::Error for RecvError {} // ===== impl TryRecvError ===== @@ -70,7 +70,7 @@ pub mod error { } } - impl ::std::error::Error for TryRecvError {} + impl std::error::Error for TryRecvError {} } use self::error::*; diff --git a/tokio/src/sync/semaphore_ll.rs b/tokio/src/sync/semaphore_ll.rs index baed5f0a..6550f13d 100644 --- a/tokio/src/sync/semaphore_ll.rs +++ b/tokio/src/sync/semaphore_ll.rs @@ -826,7 +826,7 @@ impl fmt::Display for AcquireError { } } -impl ::std::error::Error for AcquireError {} +impl std::error::Error for AcquireError {} // ===== impl TryAcquireError ===== @@ -858,7 +858,7 @@ impl fmt::Display for TryAcquireError { } } -impl ::std::error::Error for TryAcquireError {} +impl std::error::Error for TryAcquireError {} // ===== impl Waiter ===== diff --git a/tokio/src/sync/watch.rs b/tokio/src/sync/watch.rs index d6b82982..ebcad45c 100644 --- a/tokio/src/sync/watch.rs +++ b/tokio/src/sync/watch.rs @@ -117,7 +117,7 @@ pub mod error { } } - impl ::std::error::Error for SendError {} + impl std::error::Error for SendError {} } #[derive(Debug)] diff --git a/tokio/tests/rt_common.rs b/tokio/tests/rt_common.rs index 00256d05..15f5de6c 100644 --- a/tokio/tests/rt_common.rs +++ b/tokio/tests/rt_common.rs @@ -535,7 +535,7 @@ rt_test! { impl Drop for Boom { fn drop(&mut self) { - assert!(::std::thread::panicking()); + assert!(std::thread::panicking()); self.0.take().unwrap().send(()).unwrap(); } } diff --git a/tokio/tests/sync_errors.rs b/tokio/tests/sync_errors.rs index 260f3be6..66e8f0c0 100644 --- a/tokio/tests/sync_errors.rs +++ b/tokio/tests/sync_errors.rs @@ -1,7 +1,7 @@ #![warn(rust_2018_idioms)] #![cfg(feature = "full")] -fn is_error() {} +fn is_error() {} #[test] fn mpsc_error_bound() { -- cgit v1.2.3