use std::fmt::{self, Display, Formatter};
use tokio::net::unix::SocketAddr;
#[derive(Debug)]
pub(super) struct ShowUnixAddr<'a>(pub &'a SocketAddr);
impl Display for ShowUnixAddr<'_> {
#[inline]
fn fmt(&self, f: &mut Formatter) -> fmt::Result {
match self.0.as_pathname() {
Some(path) => path.display().fmt(f),
None => f.write_str("<unnamed unix socket>"),
}
}
}