From 27f2cd3db07a8c03807c1c3c48c87276535ca36e Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Thu, 6 Jan 2022 16:09:24 +0100 Subject: [PATCH 1/2] docs(sdk): document features needed for store_path If default features `sled_state_store` and `sled_cryptostore` aren't enabled, then passing a store path to the Client does nothing. --- crates/matrix-sdk/src/config/client.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/crates/matrix-sdk/src/config/client.rs b/crates/matrix-sdk/src/config/client.rs index fbd761110..109aa45fd 100644 --- a/crates/matrix-sdk/src/config/client.rs +++ b/crates/matrix-sdk/src/config/client.rs @@ -127,10 +127,11 @@ impl ClientConfig { /// * `path` - The path where the stores should save data in. It is the /// callers responsibility to make sure that the path exists. /// - /// In the default configuration the client will open default - /// implementations for the crypto store and the state store. It will use - /// the given path to open the stores. If no path is provided no store will - /// be opened + /// In the default configuration, and if the corresponding features + /// (`sled_state_store` and `sled_cryptostore`) are enabled, the client will + /// open default implementations for the crypto store and the state store. + /// It will use the given path to open the stores. If no path is provided no + /// store will be opened #[must_use] pub fn store_path(mut self, path: impl AsRef) -> Self { self.base_config = self.base_config.store_path(path); From d09792e402b86c2135d407f5125485d0396a32e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damir=20Jeli=C4=87?= Date: Tue, 1 Feb 2022 13:47:16 +0100 Subject: [PATCH 2/2] docs(matrix-sdk): Clarify that an in-memory store will be used --- crates/matrix-sdk/src/config/client.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/matrix-sdk/src/config/client.rs b/crates/matrix-sdk/src/config/client.rs index 109aa45fd..2781ffe24 100644 --- a/crates/matrix-sdk/src/config/client.rs +++ b/crates/matrix-sdk/src/config/client.rs @@ -130,8 +130,8 @@ impl ClientConfig { /// In the default configuration, and if the corresponding features /// (`sled_state_store` and `sled_cryptostore`) are enabled, the client will /// open default implementations for the crypto store and the state store. - /// It will use the given path to open the stores. If no path is provided no - /// store will be opened + /// It will use the given path to open the stores. If no path is provided an + /// in-memory store will be opened. #[must_use] pub fn store_path(mut self, path: impl AsRef) -> Self { self.base_config = self.base_config.store_path(path);