summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlittleblack111 <littleblack11111@gmail.com>2025-09-15 14:59:12 +0800
committerlittleblack111 <littleblack11111@gmail.com>2025-09-17 21:28:52 +0800
commit4517907896246d815d1ab2b4c67b883cd567eae0 (patch)
tree6fe8273a3a29097989a1403a922225d2d2c49bd5
parent6aa43af1bd480e58b79eed0a887950f8f93827c6 (diff)
feat: use typed network task
-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 1455eac..735a3d3 100644
--- a/src/client/connector.rs
+++ b/src/client/connector.rs
@@ -3,7 +3,7 @@ pub mod httpconnector;
use std::net::IpAddr;
use crate::{client::Client, executor::Executor};
-use remote_control_rs::tasks::IntoTask;
+use remote_control_rs::tasks::{IntoTask, NETWORK_T};
pub type Result<T: std::fmt::Display + IntoTask, E: std::fmt::Debug> = std::result::Result<T, E>;
@@ -23,7 +23,7 @@ pub trait Connection {
fn get_ip(&self) -> Option<IpAddr>;
fn force_network(&mut self) {
- _ = Executor::new("network", ["on".to_string()]);
+ _ = Executor::new(&NETWORK_T, ["on".to_string()]);
}
fn init(&self, c: &Client<Self>) -> std::result::Result<(), Self::Err>