diff --git a/ubisync-lib/src/types/peer_id.rs b/ubisync-lib/src/types/peer_id.rs index bff3923..8c4bf51 100644 --- a/ubisync-lib/src/types/peer_id.rs +++ b/ubisync-lib/src/types/peer_id.rs @@ -52,7 +52,7 @@ impl From for I2pSocketAddr { impl From for PeerId { fn from(value: I2pSocketAddr) -> Self { - Self::try_from_b32(&value.dest().string(), Some(value.port())).unwrap_or( + Self::try_from_b32(&value.dest().string(), Some(value.port())).unwrap_or_else(|_| Self::try_from_dest(&value.dest().string(), Some(value.port())).expect(&format!( "I2pSocketAddr was neither in b32 nor in b64 format: {value:?}" )),