From b7bc239c47d419ea5c5b078b89ca11def6c7311b Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Wed, 17 Sep 2025 19:24:00 +0800 Subject: perf: more prevalent &str --- src/client/connector.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/client/connector.rs') 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; 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)] -- cgit v1.2.3