diff --git a/common/src/notify.rs b/common/src/notify.rs index 0f8a35d..02c8128 100644 --- a/common/src/notify.rs +++ b/common/src/notify.rs @@ -8,6 +8,7 @@ mod export { use perlmod::Value; use proxmox_http_error::HttpError; + use proxmox_notify::api::Target; use proxmox_notify::endpoints::gotify::{ DeleteableGotifyProperty, GotifyConfig, GotifyConfigUpdater, GotifyPrivateConfig, GotifyPrivateConfigUpdater, @@ -27,7 +28,6 @@ mod export { MatcherConfigUpdater, SeverityMatcher, }; use proxmox_notify::{api, Config, Notification, Severity}; - use proxmox_notify::api::Target; pub struct NotificationConfig { config: Mutex, @@ -114,9 +114,7 @@ mod export { } #[export(serialize_error)] - fn get_targets( - #[try_from_ref] this: &NotificationConfig, - ) -> Result, HttpError> { + fn get_targets(#[try_from_ref] this: &NotificationConfig) -> Result, HttpError> { let config = this.config.lock().unwrap(); api::get_targets(&config) } @@ -429,10 +427,7 @@ mod export { endpoint_config: WebhookConfig, ) -> Result<(), HttpError> { let mut config = this.config.lock().unwrap(); - api::webhook::add_endpoint( - &mut config, - endpoint_config, - ) + api::webhook::add_endpoint(&mut config, endpoint_config) } #[export(serialize_error)] diff --git a/common/src/subscription.rs b/common/src/subscription.rs index d4c7227..594c778 100644 --- a/common/src/subscription.rs +++ b/common/src/subscription.rs @@ -5,9 +5,9 @@ mod export { use proxmox_subscription::SubscriptionInfo; use proxmox_sys::fs::CreateOptions; - use proxmox_http::ProxyConfig; - use proxmox_http::HttpOptions; use proxmox_http::client::sync::Client; + use proxmox_http::HttpOptions; + use proxmox_http::ProxyConfig; #[export] fn read_subscription(path: String) -> Result, Error> { @@ -69,7 +69,11 @@ mod export { Some(url) => Some(ProxyConfig::parse_proxy_url(&url)?), None => None, }; - let options = HttpOptions { proxy_config, user_agent: Some(user_agent) , ..Default::default() }; + let options = HttpOptions { + proxy_config, + user_agent: Some(user_agent), + ..Default::default() + }; let client = Client::new(options); proxmox_subscription::check::check_subscription(key, server_id, product_url, client)