diff options
| author | littleblack111 <littleblack11111@gmail.com> | 2025-09-17 19:24:00 +0800 |
|---|---|---|
| committer | littleblack111 <littleblack11111@gmail.com> | 2025-09-17 21:28:53 +0800 |
| commit | b7bc239c47d419ea5c5b078b89ca11def6c7311b (patch) | |
| tree | baa005a248467d8347c5e3537aefae47ad6340dd /src/client/connector | |
| parent | d3e755389ad61a262767f4a0cb48c0a2f85c80c6 (diff) | |
perf: more prevalent &str
Diffstat (limited to 'src/client/connector')
| -rw-r--r-- | src/client/connector/httpconnector.rs | 4 |
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)?, |
