Skip to content

Commit

Permalink
fix(iroh-net): remove transparent attribute from mapping debug + lo…
Browse files Browse the repository at this point in the history
…g bump (#1339)

* fix(iroh-net): portmapper's mapping implementation of debug no longer uses transparent + log level bump

* fmt
  • Loading branch information
divagant-martian committed Aug 8, 2023
1 parent 7f8463f commit 2878e79
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
4 changes: 2 additions & 2 deletions iroh-net/src/portmapper/current_mapping.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use futures::Future;
use iroh_metrics::inc;
use std::time::Duration;
use tokio::{sync::watch, time};
use tracing::trace;
use tracing::{debug, trace};

/// This is an implementation detail to facilitate testing.
pub(super) trait Mapping: std::fmt::Debug + Unpin {
Expand Down Expand Up @@ -90,7 +90,7 @@ impl<M: Mapping> CurrentMapping<M> {
/// Updates the mapping, informing of any changes to the external address. The old mapping is
/// returned.
pub(super) fn update(&mut self, mapping: Option<M>) -> Option<M> {
trace!("new port mapping {mapping:?}");
debug!("new port mapping {mapping:?}");
let maybe_external_addr = mapping.as_ref().map(|mapping| {
let (ip, port) = mapping.external();
SocketAddrV4::new(ip, port.into())
Expand Down
3 changes: 0 additions & 3 deletions iroh-net/src/portmapper/mapping.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,10 @@ pub(super) trait PortMapped: std::fmt::Debug + Unpin {
#[derive(derive_more::Debug)]
pub enum Mapping {
/// A UPnP mapping.
#[debug(transparent)]
Upnp(upnp::Mapping),
/// A PCP mapping.
#[debug(transparent)]
Pcp(pcp::Mapping),
/// A NAT-PMP mapping.
#[debug(transparent)]
NatPmp(nat_pmp::Mapping),
}

Expand Down

0 comments on commit 2878e79

Please sign in to comment.