From 33be17d5d0bd39aaefe1f2e7edbc6a8fa1ecf335 Mon Sep 17 00:00:00 2001 From: Benjamin Kampmann Date: Tue, 1 Mar 2022 11:52:38 +0100 Subject: [PATCH] review requests --- crates/matrix-sdk-base/Cargo.toml | 2 +- crates/matrix-sdk-base/src/store/mod.rs | 4 ++-- crates/matrix-sdk-crypto/README.md | 9 +++++++++ crates/matrix-sdk-crypto/src/machine.rs | 7 +------ 4 files changed, 13 insertions(+), 9 deletions(-) diff --git a/crates/matrix-sdk-base/Cargo.toml b/crates/matrix-sdk-base/Cargo.toml index c4bf794e4..c9f8afb03 100644 --- a/crates/matrix-sdk-base/Cargo.toml +++ b/crates/matrix-sdk-base/Cargo.toml @@ -20,7 +20,7 @@ default = [] encryption = ["matrix-sdk-crypto", "store_key"] qrcode = ["matrix-sdk-crypto/qrcode"] -# State Key is a helper feature for state store implementations +# Store Key is a helper feature for state store implementations store_key = [ "pbkdf2", "hmac", diff --git a/crates/matrix-sdk-base/src/store/mod.rs b/crates/matrix-sdk-base/src/store/mod.rs index e5e4abd89..fd4190f88 100644 --- a/crates/matrix-sdk-base/src/store/mod.rs +++ b/crates/matrix-sdk-base/src/store/mod.rs @@ -1,5 +1,3 @@ -//! Implementing the state store - // Copyright 2021 The Matrix.org Foundation C.I.C. // // Licensed under the Apache License, Version 2.0 (the "License"); @@ -14,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +//! Implementing the state store + use std::{ collections::{BTreeMap, BTreeSet}, ops::Deref, diff --git a/crates/matrix-sdk-crypto/README.md b/crates/matrix-sdk-crypto/README.md index 8ce11a3e8..2cb69f23e 100644 --- a/crates/matrix-sdk-crypto/README.md +++ b/crates/matrix-sdk-crypto/README.md @@ -61,3 +61,12 @@ The decision tree below visualizes the way this crate decides whether a room key will be shared with a requester upon a key request. ![](https://raw.githubusercontent.com/matrix-org/matrix-rust-sdk/main/contrib/key-sharing-algorithm/model.png) + + +# Crate Feature Flags + +The following crate feature flags are available: + +* `qrcode`: Enbles QRcode generation and reading code + +* `testing`: provides facilities and functions for tests, in particular for integration testing store implementations. ATTENTION: do not ever use outside of tests, we do not provide any stability warantees on these, these are merly helpers. If you find you _need_ any function provided here outside of tests, please open a Github Issue and inform us about your use case for us to consider. \ No newline at end of file diff --git a/crates/matrix-sdk-crypto/src/machine.rs b/crates/matrix-sdk-crypto/src/machine.rs index 1d78833bb..a1f76ecd1 100644 --- a/crates/matrix-sdk-crypto/src/machine.rs +++ b/crates/matrix-sdk-crypto/src/machine.rs @@ -442,7 +442,7 @@ impl OlmMachine { /// /// # Example /// - /// ```[skip] + /// ``` /// # use std::convert::TryFrom; /// # use matrix_sdk_crypto::OlmMachine; /// # use ruma::{user_id, device_id}; @@ -451,11 +451,6 @@ impl OlmMachine { /// # let machine = OlmMachine::new(alice, device_id!("DEVICEID")); /// # block_on(async { /// if machine.should_upload_keys().await { - /// let request = machine - /// .keys_for_upload() - /// .await - /// .unwrap(); - /// /// // Upload the keys here. /// } /// # });