Bugfix: Lazily evaluate b64 address construction after b32 try
This commit is contained in:
parent
3758249a28
commit
0c2bdb2ee3
1 changed files with 1 additions and 1 deletions
|
@ -52,7 +52,7 @@ impl From<PeerId> for I2pSocketAddr {
|
|||
|
||||
impl From<I2pSocketAddr> 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:?}"
|
||||
)),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue