diff options
| author | littleblack111 <littleblack11111@gmail.com> | 2025-09-24 00:58:09 +0800 |
|---|---|---|
| committer | littleblack111 <littleblack11111@gmail.com> | 2025-09-24 00:58:09 +0800 |
| commit | 12068a53657ddad6a4f1a277dd03e095400f690d (patch) | |
| tree | 675d7043832319643699d7a737844479621b729d /src/client/connector.rs | |
| parent | 0cfc9d0f4acac43ce20b445ac883b7cf0ca1dc79 (diff) | |
formatmain
Diffstat (limited to 'src/client/connector.rs')
| -rw-r--r-- | src/client/connector.rs | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/src/client/connector.rs b/src/client/connector.rs index 25f8b5c..00d9f3f 100644 --- a/src/client/connector.rs +++ b/src/client/connector.rs @@ -27,23 +27,18 @@ pub trait Connection { fn get_ip(&self) -> Option<IpAddr>; fn force_network(&mut self) { - _ = Executor::new( - &NETWORK_T, - ["true"], - ); + _ = Executor::new(&NETWORK_T, ["true"]); } fn init<'a>(&self, c: &Client<'a, Self>) -> std::result::Result<(), Self::Err> where Self: std::marker::Sized, { - self.ntfy( - format!( - r#"New client: + self.ntfy(format!( + r#"New client: {c} "#, - ), - ) + )) } fn reinit(&mut self) { @@ -89,14 +84,7 @@ pub trait Connection { } Result::Err(e) => { #[cfg(debug_assertions)] - std::eprintln!( - "[{}:{}:{}] {} = {:#?}", - std::file!(), - std::line!(), - std::column!(), - std::stringify!(e), - &&e as &dyn std::fmt::Debug, - ); + std::eprintln!("[{}:{}:{}] {} = {:#?}", std::file!(), std::line!(), std::column!(), std::stringify!(e), &&e as &dyn std::fmt::Debug,); } } } |
