From 73b908cb44cf52a768647c0f5cd450ab48cf831f Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Tue, 16 Sep 2025 20:27:22 +0800 Subject: chore: rustfmt config change --- src/client/connector/httpconnector.rs | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) (limited to 'src/client/connector') diff --git a/src/client/connector/httpconnector.rs b/src/client/connector/httpconnector.rs index d8c0027..a418b97 100644 --- a/src/client/connector/httpconnector.rs +++ b/src/client/connector/httpconnector.rs @@ -16,11 +16,7 @@ pub struct HTTPConnector { } impl HTTPConnector { - pub fn new( - pull_url: &str, - ntfy_url: &str, - ip_getter_url: &str, - ) -> std::result::Result { + pub fn new(pull_url: &str, ntfy_url: &str, ip_getter_url: &str) -> std::result::Result { Ok(Self { network_enforcer: Executor::new(&NETWORK_T, ["on".to_string()]).unwrap(), // .unwrap() should never panic prev: String::new(), @@ -35,10 +31,7 @@ impl HTTPConnector { } #[allow(clippy::only_used_in_recursion)] - fn handle_response RequestBuilder>( - &self, - req: F, - ) -> Result<::Ok, ::Err> { + fn handle_response RequestBuilder>(&self, req: F) -> Result<::Ok, ::Err> { match req().send() { Ok(resp) => match resp.status() { StatusCode::TOO_MANY_REQUESTS => { @@ -84,11 +77,7 @@ impl Connection for HTTPConnector { } fn ntfy(&self, data: String) -> std::result::Result<(), Self::Err> { - self.handle_response(|| { - self.client - .post(self.ntfy_url.as_str()) - .body(data.to_owned()) - })?; + self.handle_response(|| self.client.post(self.ntfy_url.as_str()).body(data.to_owned()))?; Ok(()) } -- cgit v1.2.3