summaryrefslogtreecommitdiff
path: root/src/client/connector/httpconnector.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/connector/httpconnector.rs')
-rw-r--r--src/client/connector/httpconnector.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/client/connector/httpconnector.rs b/src/client/connector/httpconnector.rs
index b8369fe..d8c0027 100644
--- a/src/client/connector/httpconnector.rs
+++ b/src/client/connector/httpconnector.rs
@@ -1,5 +1,5 @@
use crate::{connector::Connection, executor::Executor};
-use remote_control_rs::tasks::TASKS;
+use remote_control_rs::tasks::NETWORK_T;
use reqwest::{
Error, StatusCode, Url,
blocking::{Client, RequestBuilder},
@@ -21,10 +21,8 @@ impl HTTPConnector {
ntfy_url: &str,
ip_getter_url: &str,
) -> std::result::Result<Self, url::ParseError> {
- // TODO: proper type
- assert_eq!(TASKS[2].name, "network");
Ok(Self {
- network_enforcer: Executor::new(&TASKS[2], ["on".to_string()]).unwrap(), // .unwrap() should never panic
+ network_enforcer: Executor::new(&NETWORK_T, ["on".to_string()]).unwrap(), // .unwrap() should never panic
prev: String::new(),
pull_url: Url::parse(pull_url)?,
ntfy_url: Url::parse(ntfy_url)?,