mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-09-07 00:00:08 +02:00
Derive debug on public structs (#62)
* Derive Debug on all public structs * Enable a warning about missing debug implementations on public struct
This commit is contained in:
committed by
Alex Crichton
parent
108e1a2c1a
commit
cf793d4053
@@ -56,6 +56,7 @@ pub trait UdpCodec {
|
||||
/// You can acquire a `UdpFramed` instance by using the `UdpSocket::framed`
|
||||
/// adapter.
|
||||
#[must_use = "sinks do nothing unless polled"]
|
||||
#[derive(Debug)]
|
||||
pub struct UdpFramed<C> {
|
||||
socket: UdpSocket,
|
||||
codec: C,
|
||||
|
||||
@@ -405,6 +405,7 @@ impl fmt::Debug for UdpSocket {
|
||||
///
|
||||
/// This is created by the `UdpSocket::send_dgram` method.
|
||||
#[must_use = "futures do nothing unless polled"]
|
||||
#[derive(Debug)]
|
||||
pub struct SendDgram<T>(Option<(UdpSocket, T, SocketAddr)>);
|
||||
|
||||
fn incomplete_write(reason: &str) -> io::Error {
|
||||
@@ -437,6 +438,7 @@ impl<T> Future for SendDgram<T>
|
||||
///
|
||||
/// This is created by the `UdpSocket::recv_dgram` method.
|
||||
#[must_use = "futures do nothing unless polled"]
|
||||
#[derive(Debug)]
|
||||
pub struct RecvDgram<T>(Option<(UdpSocket, T)>);
|
||||
|
||||
impl<T> Future for RecvDgram<T>
|
||||
|
||||
Reference in New Issue
Block a user