style(lib): use just std instead of ::std in paths (#2101)

This commit is contained in:
Linus Färnstrand
2020-01-29 19:25:57 +01:00
committed by GitHub
parent c4bb4db5c2
commit de7418da2f
14 changed files with 32 additions and 32 deletions

View File

@@ -21,7 +21,7 @@ use tokio::net::TcpStream;
use tokio::runtime::Runtime;
fn s(buf: &[u8]) -> &str {
::std::str::from_utf8(buf).expect("from_utf8")
std::str::from_utf8(buf).expect("from_utf8")
}
fn tcp_connect(addr: &SocketAddr) -> impl Future<Output = std::io::Result<TcpStream>> {
@@ -2503,7 +2503,7 @@ trait FutureHyperExt: TryFuture {
impl<F> FutureHyperExt for F
where
F: TryFuture + 'static,
F::Error: ::std::fmt::Debug,
F::Error: std::fmt::Debug,
{
fn expect(self, msg: &'static str) -> Pin<Box<dyn Future<Output = Self::Ok>>> {
Box::pin(

View File

@@ -2157,7 +2157,7 @@ impl ServeOptions {
}
fn s(buf: &[u8]) -> &str {
::std::str::from_utf8(buf).unwrap()
std::str::from_utf8(buf).unwrap()
}
fn has_header(msg: &str, name: &str) -> bool {

View File

@@ -208,12 +208,12 @@ macro_rules! __internal_headers_map {
macro_rules! __internal_headers_eq {
(@pat $name: expr, $pat:pat) => {
::std::sync::Arc::new(move |__hdrs: &hyper::HeaderMap| {
std::sync::Arc::new(move |__hdrs: &hyper::HeaderMap| {
match __hdrs.get($name) {
$pat => (),
other => panic!("headers[{}] was not {}: {:?}", stringify!($name), stringify!($pat), other),
}
}) as ::std::sync::Arc<dyn Fn(&hyper::HeaderMap) + Send + Sync>
}) as std::sync::Arc<dyn Fn(&hyper::HeaderMap) + Send + Sync>
};
(@val $name: expr, NONE) => {
__internal_headers_eq!(@pat $name, None);
@@ -223,13 +223,13 @@ macro_rules! __internal_headers_eq {
};
(@val $name: expr, $val:expr) => ({
let __val = Option::from($val);
::std::sync::Arc::new(move |__hdrs: &hyper::HeaderMap| {
std::sync::Arc::new(move |__hdrs: &hyper::HeaderMap| {
if let Some(ref val) = __val {
assert_eq!(__hdrs.get($name).expect(stringify!($name)), val.to_string().as_str(), stringify!($name));
} else {
assert_eq!(__hdrs.get($name), None, stringify!($name));
}
}) as ::std::sync::Arc<dyn Fn(&hyper::HeaderMap) + Send + Sync>
}) as std::sync::Arc<dyn Fn(&hyper::HeaderMap) + Send + Sync>
});
($headers:ident, { $($name:expr => $val:tt,)* }) => {
$(