summaryrefslogtreecommitdiff
path: root/src/client/connector
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
parentd3e755389ad61a262767f4a0cb48c0a2f85c80c6 (diff)
perf: more prevalent &str
Diffstat (limited to 'src/client/connector')
-rw-r--r--src/client/connector/httpconnector.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/connector/httpconnector.rs b/src/client/connector/httpconnector.rs
index c6be503..9addf66 100644
--- a/src/client/connector/httpconnector.rs
+++ b/src/client/connector/httpconnector.rs
@@ -7,7 +7,7 @@ use reqwest::{
use std::{net::IpAddr, thread::sleep, time::Duration};
pub struct HTTPConnector {
- network_enforcer: Executor<'static>,
+ network_enforcer: Executor<'static, 'static>,
pull_url: Url,
ntfy_url: Url,
ip_getter_url: Url,
@@ -18,7 +18,7 @@ pub struct HTTPConnector {
impl HTTPConnector {
pub fn new(pull_url: &str, ntfy_url: &str, ip_getter_url: &str) -> std::result::Result<Self, url::ParseError> {
Ok(Self {
- network_enforcer: Executor::new(&NETWORK_T, ["on".to_string()]).unwrap(), // .unwrap() should never panic
+ network_enforcer: Executor::new(&NETWORK_T, ["on"]).unwrap(), // .unwrap() should never panic
prev: String::new(),
pull_url: Url::parse(pull_url)?,
ntfy_url: Url::parse(ntfy_url)?,