Skip to content

Commit

Permalink
chore: enforce that we don't have dbg! in our code
Browse files Browse the repository at this point in the history
Pull-Request: #4784.
  • Loading branch information
thomaseizinger authored Nov 2, 2023
1 parent e5efafc commit 96b4c4a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ clippy.used_underscore_binding = "warn"
clippy.pedantic = "allow"
clippy.type_complexity = "allow"
clippy.unnecessary_wraps = "warn"
clippy.dbg_macro = "warn"

[workspace.metadata.release]
pre-release-hook = ["/bin/sh", '-c', '/bin/sh $WORKSPACE_ROOT/scripts/add-changelog-header.sh'] # Nested use of shell to expand variables.
2 changes: 1 addition & 1 deletion transports/noise/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ where
handshake::send_identity(&mut state).await?;
handshake::recv_identity(&mut state).await?;

let (pk, io) = dbg!(state.finish())?;
let (pk, io) = state.finish()?;

Ok((pk.to_peer_id(), io))
}
Expand Down
2 changes: 1 addition & 1 deletion transports/webrtc/tests/smoke.rs
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ impl Future for ListenUpgrade<'_> {

fn poll(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output> {
loop {
match dbg!(self.listener.poll_next_unpin(cx)) {
match self.listener.poll_next_unpin(cx) {
Poll::Ready(Some(TransportEvent::Incoming {
upgrade,
send_back_addr,
Expand Down

0 comments on commit 96b4c4a

Please sign in to comment.