From 8b15acf98353f7880bbc510e279ca35770601de1 Mon Sep 17 00:00:00 2001 From: Jonathan Krebs Date: Fri, 13 Dec 2024 15:24:22 +0100 Subject: [PATCH] remove warnings around initiator loading. cleaner error handling remains todo. --- bffhd/initiators/mod.rs | 2 +- bffhd/lib.rs | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/bffhd/initiators/mod.rs b/bffhd/initiators/mod.rs index ba32c45..0b84195 100644 --- a/bffhd/initiators/mod.rs +++ b/bffhd/initiators/mod.rs @@ -100,7 +100,7 @@ pub fn load( config: &Config, resources: ResourcesHandle, sessions: SessionManager, - authentication: AuthenticationHandle, + _authentication: AuthenticationHandle, ) -> miette::Result<()> { let span = tracing::info_span!("loading initiators"); let _guard = span.enter(); diff --git a/bffhd/lib.rs b/bffhd/lib.rs index da1797b..f7fe6f7 100644 --- a/bffhd/lib.rs +++ b/bffhd/lib.rs @@ -87,6 +87,7 @@ impl error::Description for SignalHandlerErr { } #[derive(Debug, Error, Diagnostic)] +// TODO 0.5: #[non_exhaustive] pub enum BFFHError { #[error("DB operation failed")] DBError( @@ -210,7 +211,9 @@ impl Diflouroborane { self.resources.clone(), sessionmanager.clone(), authentication.clone(), - ); + ).expect("initializing initiators failed"); + // TODO 0.5: error handling. Add variant to BFFHError + actors::load(self.executor.clone(), &self.config, self.resources.clone())?; let tlsconfig = TlsConfig::new(self.config.tlskeylog.as_ref(), !self.config.is_quiet())?;