From 24e5aa1026fa3184b4dc778c4e8cf1417593d2d5 Mon Sep 17 00:00:00 2001 From: Eric Eastwood Date: Fri, 5 Jun 2026 14:50:15 -0500 Subject: [PATCH] Clone `config` --- rust/src/config/mod.rs | 4 ++-- rust/src/handlers/mod.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/rust/src/config/mod.rs b/rust/src/config/mod.rs index 65755befaa..763b9fcb1f 100644 --- a/rust/src/config/mod.rs +++ b/rust/src/config/mod.rs @@ -15,7 +15,7 @@ use pyo3::prelude::*; -#[derive(FromPyObject)] +#[derive(FromPyObject, Clone)] pub struct SynapseConfig { pub experimental: ExperimentalConfig, } @@ -28,7 +28,7 @@ pub struct SynapseConfig { // TrustedPrivateChat, // } -#[derive(FromPyObject)] +#[derive(FromPyObject, Clone)] pub struct ExperimentalConfig { pub msc3881_enabled: bool, pub msc3575_enabled: bool, diff --git a/rust/src/handlers/mod.rs b/rust/src/handlers/mod.rs index 3036de7241..a2a0d6af12 100644 --- a/rust/src/handlers/mod.rs +++ b/rust/src/handlers/mod.rs @@ -51,13 +51,13 @@ impl RustHandlers { // Store is shared across all of the handlers so let's use an `Arc` let store = Arc::new(Store { - config, + config: config.clone(), db_pool: Box::new(db_pool), }); Ok(RustHandlers { versions: versions::VersionsHandler { - config, + config: config.clone(), store: Arc::clone(&store), }, })