From ddf645e19e619cfcecc93ccdc6f0442d0a8da4af Mon Sep 17 00:00:00 2001 From: Adrian Heine Date: Tue, 2 Sep 2025 11:47:36 +0200 Subject: [PATCH] cargo fmt --- src/builder.rs | 8 ++++---- src/locator.rs | 13 ++++++++----- src/setup/util.rs | 4 +++- src/symbols/user.rs | 2 +- 4 files changed, 16 insertions(+), 11 deletions(-) diff --git a/src/builder.rs b/src/builder.rs index fddb7fa..5652a07 100644 --- a/src/builder.rs +++ b/src/builder.rs @@ -1,9 +1,9 @@ use crate::command_runner::{SetuidCommandRunner, StdCommandRunner}; use crate::resources::{ - AcmeAccountKey, AcmeChallengesDir, AcmeChallengesNginxSnippet, AcmeUser, Cert, - CertChain, Cron, Csr, DefaultServer, Dir, File, GitCheckout, Key, KeyAndCertBundle, - LoadedDirectory, MariaDbDatabase, MariaDbUser, NpmInstall, Owner, PhpFpmPool, PostgresqlDatabase, - Resource, ServeCustom, ServePhp, ServeRedir, ServeService, ServeStatic, StoredDirectory, + AcmeAccountKey, AcmeChallengesDir, AcmeChallengesNginxSnippet, AcmeUser, Cert, CertChain, Cron, + Csr, DefaultServer, Dir, File, GitCheckout, Key, KeyAndCertBundle, LoadedDirectory, + MariaDbDatabase, MariaDbUser, NpmInstall, Owner, PhpFpmPool, PostgresqlDatabase, Resource, + ServeCustom, ServePhp, ServeRedir, ServeService, ServeStatic, StoredDirectory, SystemdSocketService, User, UserForDomain, WordpressPlugin, WordpressTranslation, }; use crate::storage::SimpleStorage; diff --git a/src/locator.rs b/src/locator.rs index 277566b..4ad4fbf 100644 --- a/src/locator.rs +++ b/src/locator.rs @@ -3,10 +3,10 @@ use crate::artifacts::{ UserName as UserNameArtifact, }; use crate::resources::{ - AcmeAccountKey, AcmeChallengesDir, AcmeChallengesNginxSnippet, AcmeUser, Cert, - CertChain, Cron, Csr, DefaultServer, Dir, File, GitCheckout, Key, KeyAndCertBundle, - LoadedDirectory, MariaDbDatabase, MariaDbUser, NpmInstall, Owner, PhpFpmPool, PostgresqlDatabase, - Resource, ServeCustom, ServePhp, ServeRedir, ServeService, ServeStatic, StoredDirectory, + AcmeAccountKey, AcmeChallengesDir, AcmeChallengesNginxSnippet, AcmeUser, Cert, CertChain, Cron, + Csr, DefaultServer, Dir, File, GitCheckout, Key, KeyAndCertBundle, LoadedDirectory, + MariaDbDatabase, MariaDbUser, NpmInstall, Owner, PhpFpmPool, PostgresqlDatabase, Resource, + ServeCustom, ServePhp, ServeRedir, ServeService, ServeStatic, StoredDirectory, SystemdSocketService, User, UserForDomain, WordpressPlugin, WordpressTranslation, }; use crate::to_artifact::ToArtifact; @@ -198,7 +198,10 @@ impl ResourceLocator for DefaultLocator

{ fn locate(_resource: &AcmeUser) -> (::Artifact, Self::Prerequisites) { let user_name = P::acme_user(); let home = P::user_home(&user_name); - ((UserNameArtifact(user_name.into()), PathArtifact::from(home)), ()) + ( + (UserNameArtifact(user_name.into()), PathArtifact::from(home)), + (), + ) } } diff --git a/src/setup/util.rs b/src/setup/util.rs index 6951165..315958e 100644 --- a/src/setup/util.rs +++ b/src/setup/util.rs @@ -108,7 +108,9 @@ impl Recorder { slog_term::CompactFormat::new(decorator).build(), move |record| record.level().is_at_least(filter_level), ); - let Ok(mutex) = Arc::try_unwrap(self.0) else { panic!("cannot unwrap Arc") }; // AsyncRecord does not implement Debug, so we cannot unwrap + let Ok(mutex) = Arc::try_unwrap(self.0) else { + panic!("cannot unwrap Arc") + }; // AsyncRecord does not implement Debug, so we cannot unwrap for record in mutex.into_inner().unwrap() { record.log_to(&drain).unwrap(); } diff --git a/src/symbols/user.rs b/src/symbols/user.rs index 4c76058..ddde440 100644 --- a/src/symbols/user.rs +++ b/src/symbols/user.rs @@ -3,8 +3,8 @@ use crate::symbols::Symbol; use async_trait::async_trait; use once_cell::sync::Lazy; use std::error::Error; -use tokio::sync::Semaphore; use std::path::Path; +use tokio::sync::Semaphore; pub type Wait = Lazy; static WAIT: Wait = Lazy::new(|| Semaphore::new(1));