mirror of
https://github.com/mat-1/azalea.git
synced 2025-08-02 23:44:38 +00:00
impl Display for proxy and trace log JoinOpts
This commit is contained in:
parent
2b7be768f2
commit
a8e76a0bff
2 changed files with 14 additions and 2 deletions
|
@ -1,6 +1,6 @@
|
||||||
//! Connect to remote servers/clients.
|
//! Connect to remote servers/clients.
|
||||||
|
|
||||||
use std::fmt::Debug;
|
use std::fmt::{self, Debug, Display};
|
||||||
use std::io::{self, Cursor};
|
use std::io::{self, Cursor};
|
||||||
use std::marker::PhantomData;
|
use std::marker::PhantomData;
|
||||||
use std::net::SocketAddr;
|
use std::net::SocketAddr;
|
||||||
|
@ -274,6 +274,15 @@ impl Proxy {
|
||||||
Self { addr, auth }
|
Self { addr, auth }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
impl Display for Proxy {
|
||||||
|
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||||
|
write!(f, "socks5://")?;
|
||||||
|
if let Some(auth) = &self.auth {
|
||||||
|
write!(f, "{}@", auth)?;
|
||||||
|
}
|
||||||
|
write!(f, "{}", self.addr)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl Connection<ClientboundHandshakePacket, ServerboundHandshakePacket> {
|
impl Connection<ClientboundHandshakePacket, ServerboundHandshakePacket> {
|
||||||
/// Create a new connection to the given address.
|
/// Create a new connection to the given address.
|
||||||
|
|
|
@ -705,7 +705,10 @@ impl Swarm {
|
||||||
state: S,
|
state: S,
|
||||||
join_opts: &JoinOpts,
|
join_opts: &JoinOpts,
|
||||||
) -> Result<Client, JoinError> {
|
) -> Result<Client, JoinError> {
|
||||||
debug!("add_with_opts called for account {}", account.username);
|
debug!(
|
||||||
|
"add_with_opts called for account {} with opts {join_opts:?}",
|
||||||
|
account.username
|
||||||
|
);
|
||||||
|
|
||||||
let address = join_opts
|
let address = join_opts
|
||||||
.custom_address
|
.custom_address
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue