diff options
Diffstat (limited to 'src/client/connector/httpconnector.rs')
| -rw-r--r-- | src/client/connector/httpconnector.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/client/connector/httpconnector.rs b/src/client/connector/httpconnector.rs index 60405f4..eb5ebe3 100644 --- a/src/client/connector/httpconnector.rs +++ b/src/client/connector/httpconnector.rs @@ -1,5 +1,6 @@ use crate::connector::Connection; -use remote_control_rs::{executor::Executor, tasks::NETWORK_T}; +use remote_control_rs::executor::Executor; +use remote_control_rs::tasks::client::{NETWORK_T, Name}; use reqwest::{ Error, StatusCode, Url, blocking::{Client, RequestBuilder}, @@ -25,7 +26,7 @@ impl From<reqwest::Error> for HTTPConnectorError { } pub struct HTTPConnector { - network_enforcer: Executor<'static, 'static>, + network_enforcer: Executor<'static, 'static, Name>, pull_url: Url, ntfy_url: Url, ip_getter_url: Url, @@ -36,7 +37,7 @@ pub struct HTTPConnector { impl HTTPConnector { pub fn new(pull_url: &str, ntfy_url: &str, ip_getter_url: &str) -> result::Result<Self, HTTPConnectorError> { Ok(Self { - network_enforcer: Executor::new(&NETWORK_T, ["true"]).unwrap(), // .unwrap() should never panic + network_enforcer: Executor::new(NETWORK_T.as_ref(), ["true"]).unwrap(), // .unwrap() should never panic prev: String::new(), pull_url: Url::parse(pull_url)?, ntfy_url: Url::parse(ntfy_url)?, |
