Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/buffer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,12 @@ impl ToBuf for &[u8] {
#[allow(clippy::len_without_is_empty)]
pub struct TmpBuf<'a>(&'a mut [u8], usize);

impl core::fmt::Debug for TmpBuf<'_> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_struct("TmpBuf").field("data_len", &self.1).finish()
}
}

impl<'a> TmpBuf<'a> {
/// Create a new temporary buffer from a mutable slice.
pub fn new(buf: &'a mut [u8]) -> Self {
Expand Down
3 changes: 2 additions & 1 deletion src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use crate::crypto::rust_crypto;
/// DTLS configuration shared by all connections.
///
/// Build with [`Config::builder()`] or use [`Config::default()`].
#[derive(Clone)]
#[derive(Clone, Debug)]
pub struct Config {
mtu: usize,
max_queue_rx: usize,
Expand Down Expand Up @@ -201,6 +201,7 @@ impl Config {
}

/// Builder for [`Config`]. See each setter for defaults.
#[derive(Debug)]
pub struct ConfigBuilder {
mtu: usize,
max_queue_rx: usize,
Expand Down
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@
#![warn(clippy::all)]
#![allow(unknown_lints)]
#![deny(missing_docs)]
#![deny(missing_debug_implementations)]

#[macro_use]
extern crate log;
Expand Down
Loading