summaryrefslogtreecommitdiff
path: root/src/client/connector.rs
diff options
context:
space:
mode:
authorlittleblack111 <littleblack11111@gmail.com>2025-09-17 19:24:00 +0800
committerlittleblack111 <littleblack11111@gmail.com>2025-09-17 21:28:53 +0800
commitb7bc239c47d419ea5c5b078b89ca11def6c7311b (patch)
treebaa005a248467d8347c5e3537aefae47ad6340dd /src/client/connector.rs
parentd3e755389ad61a262767f4a0cb48c0a2f85c80c6 (diff)
perf: more prevalent &str
Diffstat (limited to 'src/client/connector.rs')
-rw-r--r--src/client/connector.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/connector.rs b/src/client/connector.rs
index c16b4bc..50d5f65 100644
--- a/src/client/connector.rs
+++ b/src/client/connector.rs
@@ -23,7 +23,7 @@ pub trait Connection {
fn get_ip(&self) -> Option<IpAddr>;
fn force_network(&mut self) {
- _ = Executor::new(&NETWORK_T, ["on".to_string()]);
+ _ = Executor::new(&NETWORK_T, ["on"]);
}
fn init<'a>(&self, c: &crate::client::Client<'a, Self>) -> std::result::Result<(), Self::Err>
@@ -62,7 +62,7 @@ pub trait Connection {
None => return,
};
// FIXME: handle the errors... peak prod code
- self.ntfy(Executor::new(task.try_into().unwrap(), it.map(str::to_string)).unwrap().run().unwrap().clone().unwrap()).unwrap();
+ self.ntfy(Executor::new(task.try_into().unwrap(), it).unwrap().run().unwrap().clone().unwrap()).unwrap();
}
Result::Err(e) => {
#[cfg(debug_assertions)]