From 83e65959de13d24631d592127d49c626a8df3cfd Mon Sep 17 00:00:00 2001 From: Richard Schwab Date: Tue, 25 Jun 2024 00:40:16 +0200 Subject: [PATCH] Simplify usage of federation_sender_config Option --- src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 6848dd551..74c05deaa 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -226,13 +226,13 @@ pub async fn start_lemmy_server(args: CmdArgs) -> LemmyResult<()> { } else { None }; - let federate = (!args.disable_activity_sending).then(|| { + let federate = federation_sender_config.map(|cfg| { SendManager::run( Opts { process_index: args.federate_process_index, process_count: args.federate_process_count, }, - federation_sender_config.expect("same condition as the execution of this code"), + cfg, ) }); let mut interrupt = tokio::signal::unix::signal(SignalKind::interrupt())?;