mirror of
https://github.com/element-hq/synapse.git
synced 2026-08-28 09:24:41 +00:00
Clone config
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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),
|
||||
},
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user