Skip to content

Commit b86eae6

Browse files
committed
refactor: Move event_cache_store/ to event_cache/store/ in matrix-sdk-base.
1 parent b79111b commit b86eae6

File tree

14 files changed

+32
-15
lines changed

14 files changed

+32
-15
lines changed

crates/matrix-sdk-base/src/client.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ use crate::RoomMemberships;
7070
use crate::{
7171
deserialized_responses::{RawAnySyncOrStrippedTimelineEvent, SyncTimelineEvent},
7272
error::{Error, Result},
73-
event_cache_store::EventCacheStoreLock,
73+
event_cache::store::EventCacheStoreLock,
7474
response_processors::AccountDataProcessor,
7575
rooms::{
7676
normal::{RoomInfoNotableUpdate, RoomInfoNotableUpdateReasons},
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// Copyright 2024 The Matrix.org Foundation C.I.C.
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
pub mod store;

crates/matrix-sdk-base/src/event_cache_store/integration_tests.rs renamed to crates/matrix-sdk-base/src/event_cache/store/integration_tests.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ impl EventCacheStoreIntegrationTests for DynEventCacheStore {
193193
///
194194
/// ## Usage Example:
195195
/// ```no_run
196-
/// # use matrix_sdk_base::event_cache_store::{
196+
/// # use matrix_sdk_base::event_cache::store::{
197197
/// # EventCacheStore,
198198
/// # MemoryStore as MyStore,
199199
/// # Result as EventCacheStoreResult,
@@ -217,7 +217,9 @@ macro_rules! event_cache_store_integration_tests {
217217
() => {
218218
mod event_cache_store_integration_tests {
219219
use matrix_sdk_test::async_test;
220-
use $crate::event_cache_store::{EventCacheStoreIntegrationTests, IntoEventCacheStore};
220+
use $crate::event_cache::store::{
221+
EventCacheStoreIntegrationTests, IntoEventCacheStore,
222+
};
221223

222224
use super::get_event_cache_store;
223225

@@ -249,7 +251,7 @@ macro_rules! event_cache_store_integration_tests_time {
249251
use std::time::Duration;
250252

251253
use matrix_sdk_test::async_test;
252-
use $crate::event_cache_store::IntoEventCacheStore;
254+
use $crate::event_cache::store::IntoEventCacheStore;
253255

254256
use super::get_event_cache_store;
255257

crates/matrix-sdk-base/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ mod client;
2828
pub mod debug;
2929
pub mod deserialized_responses;
3030
mod error;
31-
pub mod event_cache_store;
31+
pub mod event_cache;
3232
pub mod latest_event;
3333
pub mod media;
3434
pub mod notification_settings;

crates/matrix-sdk-base/src/store/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ use tokio::sync::{broadcast, Mutex, RwLock};
5858
use tracing::warn;
5959

6060
use crate::{
61-
event_cache_store,
61+
event_cache::store as event_cache_store,
6262
rooms::{normal::RoomInfoNotableUpdate, RoomInfo, RoomState},
6363
MinimalRoomMemberEvent, Room, RoomStateFilter, SessionMeta,
6464
};

crates/matrix-sdk-sqlite/src/error.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
use deadpool_sqlite::{CreatePoolError, PoolError};
1616
#[cfg(feature = "event-cache")]
17-
use matrix_sdk_base::event_cache_store::EventCacheStoreError;
17+
use matrix_sdk_base::event_cache::store::EventCacheStoreError;
1818
#[cfg(feature = "state-store")]
1919
use matrix_sdk_base::store::StoreError as StateStoreError;
2020
#[cfg(feature = "crypto-store")]

crates/matrix-sdk-sqlite/src/event_cache_store.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use std::{borrow::Cow, fmt, path::Path, sync::Arc};
33
use async_trait::async_trait;
44
use deadpool_sqlite::{Object as SqliteAsyncConn, Pool as SqlitePool, Runtime};
55
use matrix_sdk_base::{
6-
event_cache_store::EventCacheStore,
6+
event_cache::store::EventCacheStore,
77
media::{MediaRequestParameters, UniqueKey},
88
};
99
use matrix_sdk_store_encryption::StoreCipher;
@@ -279,7 +279,7 @@ mod tests {
279279
};
280280

281281
use matrix_sdk_base::{
282-
event_cache_store::{EventCacheStore, EventCacheStoreError},
282+
event_cache::store::{EventCacheStore, EventCacheStoreError},
283283
event_cache_store_integration_tests, event_cache_store_integration_tests_time,
284284
media::{MediaFormat, MediaRequestParameters, MediaThumbnailSettings},
285285
};
@@ -387,7 +387,7 @@ mod encrypted_tests {
387387
use std::sync::atomic::{AtomicU32, Ordering::SeqCst};
388388

389389
use matrix_sdk_base::{
390-
event_cache_store::EventCacheStoreError, event_cache_store_integration_tests,
390+
event_cache::store::EventCacheStoreError, event_cache_store_integration_tests,
391391
event_cache_store_integration_tests_time,
392392
};
393393
use once_cell::sync::Lazy;

0 commit comments

Comments
 (0)