Make all warnings across crates and binaries consistent

This commit is contained in:
Benjamin Fry
2021-03-05 17:04:46 -08:00
parent a44d44151f
commit 6fcc72acca
107 changed files with 383 additions and 223 deletions

View File

@@ -5,6 +5,18 @@
// http://opensource.org/licenses/MIT>, at your option. This file may not be
// copied, modified, or distributed except according to those terms.
// LIBRARY WARNINGS
#![warn(
clippy::dbg_macro,
clippy::print_stdout,
clippy::unimplemented,
missing_copy_implementations,
missing_docs,
non_snake_case,
non_upper_case_globals,
rust_2018_idioms,
unreachable_pub
)]
#![allow(clippy::needless_doctest_main)]
//! The Resolver is responsible for performing recursive queries to lookup domain names.

View File

@@ -33,7 +33,7 @@ impl UdpSocket for AsyncStdUdpSocket {
fn poll_recv_from(
&self,
cx: &mut Context,
cx: &mut Context<'_>,
buf: &mut [u8],
) -> Poll<io::Result<(usize, SocketAddr)>> {
let fut = self.0.recv_from(buf);
@@ -48,7 +48,7 @@ impl UdpSocket for AsyncStdUdpSocket {
fn poll_send_to(
&self,
cx: &mut Context,
cx: &mut Context<'_>,
buf: &[u8],
target: SocketAddr,
) -> Poll<io::Result<usize>> {

View File

@@ -44,7 +44,7 @@ use crate::time::AsyncStdTime;
/// [timer]: crate::time
/// [mod]: index.html
/// [`new`]: #method.new
#[derive(Clone)]
#[derive(Clone, Copy)]
pub struct AsyncStdRuntime;
impl Executor for AsyncStdRuntime {
@@ -57,7 +57,7 @@ impl Executor for AsyncStdRuntime {
}
}
#[derive(Clone)]
#[derive(Clone, Copy)]
pub struct AsyncStdRuntimeHandle;
impl Spawn for AsyncStdRuntimeHandle {
fn spawn_bg<F>(&mut self, future: F)
@@ -82,5 +82,8 @@ impl AsyncStdRuntime {
}
}
/// AsyncStd default connection
pub type AsyncStdConnection = GenericConnection;
/// AsyncStd default connection provider
pub type AsyncStdConnectionProvider = GenericConnectionProvider<AsyncStdRuntime>;

View File

@@ -12,6 +12,7 @@ use async_trait::async_trait;
use trust_dns_resolver::proto::Time;
/// AsyncStd backed timer implementation
#[derive(Clone, Copy)]
pub struct AsyncStdTime;
#[async_trait]