diff --git a/backend-demo/src/settings.rs b/backend-demo/src/settings.rs index 75aec9d78..bc52927ed 100644 --- a/backend-demo/src/settings.rs +++ b/backend-demo/src/settings.rs @@ -5,7 +5,10 @@ use ashpd::{ request::RequestImpl, settings::{SettingsImpl, SettingsSignalEmitter}, }, - desktop::{settings::{ColorScheme, Namespace, APPEARANCE_NAMESPACE, COLOR_SCHEME_KEY}, HandleToken}, + desktop::{ + settings::{ColorScheme, Namespace, APPEARANCE_NAMESPACE, COLOR_SCHEME_KEY}, + HandleToken, + }, zbus::zvariant::OwnedValue, PortalError, }; diff --git a/src/backend/account.rs b/src/backend/account.rs index 36587ce10..77d15dd88 100644 --- a/src/backend/account.rs +++ b/src/backend/account.rs @@ -70,8 +70,13 @@ impl AccountInterface { handle.clone(), Arc::clone(&self.imp), async move { - imp.get_user_information(HandleToken::try_from(&handle).unwrap(), app_id.inner(), window_identifier.inner(), options) - .await + imp.get_user_information( + HandleToken::try_from(&handle).unwrap(), + app_id.inner(), + window_identifier.inner(), + options, + ) + .await }, ) .await diff --git a/src/backend/app_chooser.rs b/src/backend/app_chooser.rs index 94389bf72..6acd0c412 100644 --- a/src/backend/app_chooser.rs +++ b/src/backend/app_chooser.rs @@ -128,8 +128,14 @@ impl AppChooserInterface { handle.clone(), Arc::clone(&self.imp), async move { - imp.choose_application(HandleToken::try_from(&handle).unwrap(), app_id.inner(), parent_window.inner(), choices, options) - .await + imp.choose_application( + HandleToken::try_from(&handle).unwrap(), + app_id.inner(), + parent_window.inner(), + choices, + options, + ) + .await }, ) .await diff --git a/src/backend/background.rs b/src/backend/background.rs index 6dfbaacea..a0482b6e6 100644 --- a/src/backend/background.rs +++ b/src/backend/background.rs @@ -56,8 +56,12 @@ pub trait BackgroundSignalEmitter: Send + Sync { pub trait BackgroundImpl: RequestImpl { async fn get_app_state(&self) -> Result, PortalError>; - async fn notify_background(&self, token: HandleToken, app_id: AppID, name: &str) - -> Result; + async fn notify_background( + &self, + token: HandleToken, + app_id: AppID, + name: &str, + ) -> Result; async fn enable_autostart( &self, @@ -130,7 +134,10 @@ impl BackgroundInterface { &self.cnx, handle.clone(), Arc::clone(&self.imp), - async move { imp.notify_background(HandleToken::try_from(&handle).unwrap(), app_id, &name).await }, + async move { + imp.notify_background(HandleToken::try_from(&handle).unwrap(), app_id, &name) + .await + }, ) .await } diff --git a/src/backend/email.rs b/src/backend/email.rs index 92c9d4fac..8a3fbecd2 100644 --- a/src/backend/email.rs +++ b/src/backend/email.rs @@ -104,8 +104,13 @@ impl EmailInterface { handle.clone(), Arc::clone(&self.imp), async move { - imp.compose(HandleToken::try_from(&handle).unwrap(), app_id.inner(), window_identifier.inner(), options) - .await + imp.compose( + HandleToken::try_from(&handle).unwrap(), + app_id.inner(), + window_identifier.inner(), + options, + ) + .await }, ) .await diff --git a/src/backend/file_chooser.rs b/src/backend/file_chooser.rs index ec9ef89ea..4a55676f0 100644 --- a/src/backend/file_chooser.rs +++ b/src/backend/file_chooser.rs @@ -250,8 +250,14 @@ impl FileChooserInterface { handle.clone(), Arc::clone(&self.imp), async move { - imp.open_file(HandleToken::try_from(&handle).unwrap(), app_id.inner(), window_identifier.inner(), &title, options) - .await + imp.open_file( + HandleToken::try_from(&handle).unwrap(), + app_id.inner(), + window_identifier.inner(), + &title, + options, + ) + .await }, ) .await @@ -274,8 +280,14 @@ impl FileChooserInterface { handle.clone(), Arc::clone(&self.imp), async move { - imp.save_file(HandleToken::try_from(&handle).unwrap(), app_id.inner(), window_identifier.inner(), &title, options) - .await + imp.save_file( + HandleToken::try_from(&handle).unwrap(), + app_id.inner(), + window_identifier.inner(), + &title, + options, + ) + .await }, ) .await @@ -298,8 +310,14 @@ impl FileChooserInterface { handle.clone(), Arc::clone(&self.imp), async move { - imp.save_files(HandleToken::try_from(&handle).unwrap(), app_id.inner(), window_identifier.inner(), &title, options) - .await + imp.save_files( + HandleToken::try_from(&handle).unwrap(), + app_id.inner(), + window_identifier.inner(), + &title, + options, + ) + .await }, ) .await diff --git a/src/backend/screenshot.rs b/src/backend/screenshot.rs index e683f74f4..c275b22ff 100644 --- a/src/backend/screenshot.rs +++ b/src/backend/screenshot.rs @@ -7,7 +7,9 @@ use crate::{ request::{Request, RequestImpl}, MaybeAppID, MaybeWindowIdentifier, Result, }, - desktop::{request::Response, screenshot::Screenshot as ScreenshotResponse, Color, HandleToken}, + desktop::{ + request::Response, screenshot::Screenshot as ScreenshotResponse, Color, HandleToken, + }, zvariant::{DeserializeDict, OwnedObjectPath, Type}, AppID, WindowIdentifierType, }; @@ -92,8 +94,13 @@ impl ScreenshotInterface { handle.clone(), Arc::clone(&self.imp), async move { - imp.screenshot(HandleToken::try_from(&handle).unwrap(), app_id.inner(), window_identifier.inner(), options) - .await + imp.screenshot( + HandleToken::try_from(&handle).unwrap(), + app_id.inner(), + window_identifier.inner(), + options, + ) + .await }, ) .await @@ -116,8 +123,13 @@ impl ScreenshotInterface { handle.clone(), Arc::clone(&self.imp), async move { - imp.pick_color(HandleToken::try_from(&handle).unwrap(), app_id.inner(), window_identifier.inner(), options) - .await + imp.pick_color( + HandleToken::try_from(&handle).unwrap(), + app_id.inner(), + window_identifier.inner(), + options, + ) + .await }, ) .await diff --git a/src/backend/secret.rs b/src/backend/secret.rs index fef7c2fd2..e8d89c87b 100644 --- a/src/backend/secret.rs +++ b/src/backend/secret.rs @@ -55,7 +55,14 @@ impl SecretInterface { &self.cnx, handle.clone(), Arc::clone(&self.imp), - async move { imp.retrieve(HandleToken::try_from(&handle).unwrap(), app_id, std::os::fd::OwnedFd::from(fd)).await }, + async move { + imp.retrieve( + HandleToken::try_from(&handle).unwrap(), + app_id, + std::os::fd::OwnedFd::from(fd), + ) + .await + }, ) .await } diff --git a/src/backend/wallpaper.rs b/src/backend/wallpaper.rs index 3fcf11d43..354500ff2 100644 --- a/src/backend/wallpaper.rs +++ b/src/backend/wallpaper.rs @@ -79,8 +79,14 @@ impl WallpaperInterface { handle.clone(), Arc::clone(&self.imp), async move { - imp.with_uri(HandleToken::try_from(&handle).unwrap(), app_id.inner(), window_identifier.inner(), uri, options) - .await + imp.with_uri( + HandleToken::try_from(&handle).unwrap(), + app_id.inner(), + window_identifier.inner(), + uri, + options, + ) + .await }, ) .await diff --git a/src/desktop/handle_token.rs b/src/desktop/handle_token.rs index b88eaf2f7..202fcf901 100644 --- a/src/desktop/handle_token.rs +++ b/src/desktop/handle_token.rs @@ -5,7 +5,10 @@ use std::{ use rand::{distributions::Alphanumeric, thread_rng, Rng}; use serde::{Deserialize, Serialize}; -use zbus::{names::OwnedMemberName, zvariant::{OwnedObjectPath, Type}}; +use zbus::{ + names::OwnedMemberName, + zvariant::{OwnedObjectPath, Type}, +}; /// A handle token is a DBus Object Path element, specified in the /// [`Request`](crate::desktop::Request) or