From 8d39821a1f148f930b097c2c64140ae1699d4d2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damir=20Jeli=C4=87?= Date: Mon, 24 Aug 2020 14:34:22 +0200 Subject: [PATCH] crypto: Remove some unused imports from the top level module. --- matrix_sdk_crypto/src/lib.rs | 2 +- matrix_sdk_crypto/src/store/sqlite.rs | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/matrix_sdk_crypto/src/lib.rs b/matrix_sdk_crypto/src/lib.rs index 7d31aceb..38630f32 100644 --- a/matrix_sdk_crypto/src/lib.rs +++ b/matrix_sdk_crypto/src/lib.rs @@ -42,8 +42,8 @@ pub use device::{Device, LocalTrust, ReadOnlyDevice, UserDevices}; pub use error::{MegolmError, OlmError}; pub use machine::OlmMachine; use memory_stores::ReadOnlyUserDevices; +pub(crate) use olm::Account; pub use olm::EncryptionSettings; -pub(crate) use olm::{Account, IdentityKeys, InboundGroupSession, Session}; pub use requests::{IncomingResponse, OutgoingRequest, OutgoingRequests}; #[cfg(feature = "sqlite_cryptostore")] pub use store::sqlite::SqliteStore; diff --git a/matrix_sdk_crypto/src/store/sqlite.rs b/matrix_sdk_crypto/src/store/sqlite.rs index 7ea291d0..3e2e6352 100644 --- a/matrix_sdk_crypto/src/store/sqlite.rs +++ b/matrix_sdk_crypto/src/store/sqlite.rs @@ -38,8 +38,8 @@ use super::{CryptoStore, CryptoStoreError, Result}; use crate::{ device::{LocalTrust, ReadOnlyDevice}, memory_stores::{DeviceStore, GroupSessionStore, ReadOnlyUserDevices, SessionStore}, + olm::{Account, IdentityKeys, InboundGroupSession, Session}, user_identity::UserIdentities, - Account, IdentityKeys, InboundGroupSession, Session, }; /// SQLite based implementation of a `CryptoStore`. @@ -907,7 +907,10 @@ impl std::fmt::Debug for SqliteStore { #[cfg(test)] mod test { - use crate::{device::test::get_device, olm::GroupSessionKey}; + use crate::{ + device::test::get_device, + olm::{Account, GroupSessionKey, InboundGroupSession, Session}, + }; use matrix_sdk_common::{ api::r0::keys::SignedKey, identifiers::{room_id, user_id, DeviceId, UserId}, @@ -916,7 +919,7 @@ mod test { use std::collections::BTreeMap; use tempfile::tempdir; - use super::{Account, CryptoStore, InboundGroupSession, Session, SqliteStore}; + use super::{CryptoStore, SqliteStore}; fn example_user_id() -> UserId { user_id!("@example:localhost")