Skip to content

Commit

Permalink
refactor: add debug instances for public types
Browse files Browse the repository at this point in the history
also change build to produce warnings if there are no debug instances on
public types.
  • Loading branch information
rklaehn committed Feb 2, 2023
1 parent e7ce384 commit b0cdec1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[build]
rustflags = ["-Wmissing_debug_implementations"]
3 changes: 3 additions & 0 deletions src/bao_slice_decoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ fn right_descendant(offset: NodeNum, len: NodeNum) -> Option<NodeNum> {
Some(offset)
}

#[derive(Debug)]
pub struct SliceIter {
len: u64,
range: Range<u64>,
Expand Down Expand Up @@ -229,6 +230,7 @@ impl StreamItem {
}
}

#[derive(Debug)]
pub struct SliceValidator<R> {
/// the inner reader
inner: R,
Expand Down Expand Up @@ -493,6 +495,7 @@ impl<R: Read> Read for SliceDecoder<R> {
}
}

#[derive(Debug)]
pub struct AsyncSliceDecoder<R: tokio::io::AsyncRead + Unpin> {
inner: SliceValidator<R>,
current_item: Option<StreamItem>,
Expand Down
1 change: 1 addition & 0 deletions src/provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ impl Builder {
/// is a shorthand to create a suitable [`Builder`].
///
/// This runs a tokio task which can be aborted and joined if desired.
#[derive(Debug)]
pub struct Provider {
listen_addr: SocketAddr,
keypair: Keypair,
Expand Down

0 comments on commit b0cdec1

Please sign in to comment.