mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-06-15 02:51:25 +00:00
Update onion_addr.rs (#1912)
This commit is contained in:
@ -1,7 +1,4 @@
|
|||||||
use std::borrow::Cow;
|
use std::{borrow::Cow, fmt};
|
||||||
use std::fmt::Debug;
|
|
||||||
use serde::export::Formatter;
|
|
||||||
use std::fmt;
|
|
||||||
|
|
||||||
/// Represents an Onion v3 address
|
/// Represents an Onion v3 address
|
||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
@ -44,8 +41,8 @@ impl<'a> From<(&'a [u8; 35], u16)> for Onion3Addr<'a> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Debug for Onion3Addr<'_> {
|
impl fmt::Debug for Onion3Addr<'_> {
|
||||||
fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), fmt::Error> {
|
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> Result<(), fmt::Error> {
|
||||||
f.debug_tuple("Onion3Addr")
|
f.debug_tuple("Onion3Addr")
|
||||||
.field(&format!("{:02x?}", &self.0[..]))
|
.field(&format!("{:02x?}", &self.0[..]))
|
||||||
.field(&self.1)
|
.field(&self.1)
|
||||||
|
Reference in New Issue
Block a user