From fdf809bd4922a1f51055a74451e93ec50bbf7247 Mon Sep 17 00:00:00 2001 From: Eric Eastwood Date: Fri, 5 Jun 2026 14:50:51 -0500 Subject: [PATCH] No need to move `config` --- rust/src/handlers/versions.rs | 4 ++-- rust/src/storage/store.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/rust/src/handlers/versions.rs b/rust/src/handlers/versions.rs index 3216848839..322d3a0620 100644 --- a/rust/src/handlers/versions.rs +++ b/rust/src/handlers/versions.rs @@ -41,7 +41,7 @@ impl VersionsHandler { .is_feature_enabled(user_id, PerUserExperimentalFeature::MSC3881) .await? } - None => PerUserExperimentalFeature::MSC3881.is_globally_enabled(self.config), + None => PerUserExperimentalFeature::MSC3881.is_globally_enabled(&self.config), }; let msc3575_enabled = match user_id { @@ -50,7 +50,7 @@ impl VersionsHandler { .is_feature_enabled(user_id, PerUserExperimentalFeature::MSC3575) .await? } - None => PerUserExperimentalFeature::MSC3575.is_globally_enabled(self.config), + None => PerUserExperimentalFeature::MSC3575.is_globally_enabled(&self.config), }; // TODO: Calculate these once since they shouldn't change after start-up. diff --git a/rust/src/storage/store.rs b/rust/src/storage/store.rs index e7952e4832..041403f39f 100644 --- a/rust/src/storage/store.rs +++ b/rust/src/storage/store.rs @@ -25,7 +25,7 @@ pub enum PerUserExperimentalFeature { } impl PerUserExperimentalFeature { - pub fn is_globally_enabled(&self, config: SynapseConfig) -> bool { + pub fn is_globally_enabled(&self, config: &SynapseConfig) -> bool { match self { PerUserExperimentalFeature::MSC3881 => config.experimental.msc3881_enabled, PerUserExperimentalFeature::MSC3575 => config.experimental.msc3575_enabled,