From 7dd00b2b7645238238ad209e14b6fc9298ccb180 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Imobach=20Gonz=C3=A1lez=20Sosa?= Date: Fri, 3 Nov 2023 15:36:38 +0000 Subject: [PATCH] Make rustfmt happy --- rust/agama-cli/src/main.rs | 6 ++++-- rust/agama-dbus-server/tests/common/mod.rs | 2 +- rust/agama-lib/src/progress.rs | 4 ++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/rust/agama-cli/src/main.rs b/rust/agama-cli/src/main.rs index f77164e842..866e4275d2 100644 --- a/rust/agama-cli/src/main.rs +++ b/rust/agama-cli/src/main.rs @@ -13,7 +13,6 @@ use crate::error::CliError; use agama_lib::error::ServiceError; use agama_lib::manager::ManagerClient; use agama_lib::progress::ProgressMonitor; -use tokio; use commands::Commands; use config::run as run_config_cmd; use logs::run as run_logs_cmd; @@ -26,6 +25,7 @@ use std::{ thread::sleep, time::Duration, }; +use tokio; #[derive(Parser)] #[command(name = "agama", version, about, long_about = None)] @@ -40,7 +40,9 @@ struct Cli { async fn probe() -> anyhow::Result<()> { let another_manager = build_manager().await?; - let probe = tokio::spawn(async move { let _ = another_manager.probe().await; }); + let probe = tokio::spawn(async move { + let _ = another_manager.probe().await; + }); show_progress().await?; Ok(probe.await?) diff --git a/rust/agama-dbus-server/tests/common/mod.rs b/rust/agama-dbus-server/tests/common/mod.rs index 002e2690ba..5c7cd9e6ba 100644 --- a/rust/agama-dbus-server/tests/common/mod.rs +++ b/rust/agama-dbus-server/tests/common/mod.rs @@ -3,7 +3,7 @@ use std::{ error::Error, future::Future, process::{Child, Command}, - time::Duration + time::Duration, }; use tokio; use tokio_stream::StreamExt; diff --git a/rust/agama-lib/src/progress.rs b/rust/agama-lib/src/progress.rs index f86d994801..f5a7fa385e 100644 --- a/rust/agama-lib/src/progress.rs +++ b/rust/agama-lib/src/progress.rs @@ -46,7 +46,7 @@ use crate::error::ServiceError; use crate::proxies::ProgressProxy; -use tokio_stream::{StreamMap, StreamExt}; +use tokio_stream::{StreamExt, StreamMap}; use zbus::Connection; /// Represents the progress for an Agama service. @@ -147,7 +147,7 @@ impl<'a> ProgressMonitor<'a> { /// /// It listens for changes in the `Current` property and generates a stream identifying the /// proxy where the change comes from. - async fn build_stream(&self) -> StreamMap<&str, zbus::PropertyStream<'_, (u32, String)>>{ + async fn build_stream(&self) -> StreamMap<&str, zbus::PropertyStream<'_, (u32, String)>> { // let mut streams = SelectAll::new(); let mut streams = StreamMap::new();