Skip to content

Commit 16ace96

Browse files
Daniel SalinasDaniel Salinas
authored andcommitted
target_arch to target_family
1 parent 6098f13 commit 16ace96

File tree

78 files changed

+221
-221
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+221
-221
lines changed

crates/matrix-sdk-base/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,10 @@ matrix-sdk-test.workspace = true
9595
similar-asserts.workspace = true
9696
stream_assert.workspace = true
9797

98-
[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]
98+
[target.'cfg(not(target_family = "wasm"))'.dev-dependencies]
9999
tokio = { workspace = true, features = ["rt-multi-thread", "macros"] }
100100

101-
[target.'cfg(target_arch = "wasm32")'.dev-dependencies]
101+
[target.'cfg(target_family = "wasm")'.dev-dependencies]
102102
wasm-bindgen-test.workspace = true
103103

104104
[lints]

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,8 @@ pub fn check_test_event(event: &TimelineEvent, text: &str) {
114114
///
115115
/// This trait is not meant to be used directly, but will be used with the
116116
/// `event_cache_store_integration_tests!` macro.
117-
#[cfg_attr(target_arch = "wasm32", async_trait(?Send))]
118-
#[cfg_attr(not(target_arch = "wasm32"), async_trait)]
117+
#[cfg_attr(target_family = "wasm", async_trait(?Send))]
118+
#[cfg_attr(not(target_family = "wasm"), async_trait)]
119119
pub trait EventCacheStoreIntegrationTests {
120120
/// Test media content storage.
121121
async fn test_media_content(&self);
@@ -154,8 +154,8 @@ pub trait EventCacheStoreIntegrationTests {
154154
async fn test_save_event(&self);
155155
}
156156

157-
#[cfg_attr(target_arch = "wasm32", async_trait(?Send))]
158-
#[cfg_attr(not(target_arch = "wasm32"), async_trait)]
157+
#[cfg_attr(target_family = "wasm", async_trait(?Send))]
158+
#[cfg_attr(not(target_family = "wasm"), async_trait)]
159159
impl EventCacheStoreIntegrationTests for DynEventCacheStore {
160160
async fn test_media_content(&self) {
161161
let uri = mxc_uri!("mxc://localhost/media");
@@ -1141,7 +1141,7 @@ macro_rules! event_cache_store_integration_tests {
11411141
#[macro_export]
11421142
macro_rules! event_cache_store_integration_tests_time {
11431143
() => {
1144-
#[cfg(not(target_arch = "wasm32"))]
1144+
#[cfg(not(target_family = "wasm"))]
11451145
mod event_cache_store_integration_tests_time {
11461146
use std::time::Duration;
11471147

crates/matrix-sdk-base/src/event_cache/store/media/integration_tests.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ use crate::media::{MediaFormat, MediaRequestParameters};
3131
///
3232
/// This trait is not meant to be used directly, but will be used with the
3333
/// `event_cache_store_media_integration_tests!` macro.
34-
#[cfg_attr(target_arch = "wasm32", async_trait(?Send))]
35-
#[cfg_attr(not(target_arch = "wasm32"), async_trait)]
34+
#[cfg_attr(target_family = "wasm", async_trait(?Send))]
35+
#[cfg_attr(not(target_family = "wasm"), async_trait)]
3636
pub trait EventCacheStoreMediaIntegrationTests {
3737
/// Test media retention policy storage.
3838
async fn test_store_media_retention_policy(&self);
@@ -58,8 +58,8 @@ pub trait EventCacheStoreMediaIntegrationTests {
5858
async fn test_store_last_media_cleanup_time(&self);
5959
}
6060

61-
#[cfg_attr(target_arch = "wasm32", async_trait(?Send))]
62-
#[cfg_attr(not(target_arch = "wasm32"), async_trait)]
61+
#[cfg_attr(target_family = "wasm", async_trait(?Send))]
62+
#[cfg_attr(not(target_family = "wasm"), async_trait)]
6363
impl<Store> EventCacheStoreMediaIntegrationTests for Store
6464
where
6565
Store: EventCacheStoreMedia + std::fmt::Debug,

crates/matrix-sdk-base/src/event_cache/store/media/media_service.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -356,8 +356,8 @@ where
356356
/// [`MediaRetentionPolicy`] by wrapping this in a [`MediaService`], and to
357357
/// simplify the implementation of tests by being able to have complete control
358358
/// over the `SystemTime`s provided to the store.
359-
#[cfg_attr(target_arch = "wasm32", async_trait(?Send))]
360-
#[cfg_attr(not(target_arch = "wasm32"), async_trait)]
359+
#[cfg_attr(target_family = "wasm", async_trait(?Send))]
360+
#[cfg_attr(not(target_family = "wasm"), async_trait)]
361361
pub trait EventCacheStoreMedia: AsyncTraitDeps + Clone {
362362
/// The error type used by this media cache store.
363363
type Error: fmt::Debug + fmt::Display + Into<EventCacheStoreError>;
@@ -630,8 +630,8 @@ mod tests {
630630
}
631631
}
632632

633-
#[cfg_attr(target_arch = "wasm32", async_trait(?Send))]
634-
#[cfg_attr(not(target_arch = "wasm32"), async_trait)]
633+
#[cfg_attr(target_family = "wasm", async_trait(?Send))]
634+
#[cfg_attr(not(target_family = "wasm"), async_trait)]
635635
impl EventCacheStoreMedia for MockEventCacheStoreMedia {
636636
type Error = MockEventCacheStoreMediaError;
637637

crates/matrix-sdk-base/src/event_cache/store/memory_store.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,8 @@ impl MemoryStore {
110110
}
111111
}
112112

113-
#[cfg_attr(target_arch = "wasm32", async_trait(?Send))]
114-
#[cfg_attr(not(target_arch = "wasm32"), async_trait)]
113+
#[cfg_attr(target_family = "wasm", async_trait(?Send))]
114+
#[cfg_attr(not(target_family = "wasm"), async_trait)]
115115
impl EventCacheStore for MemoryStore {
116116
type Error = EventCacheStoreError;
117117

@@ -364,8 +364,8 @@ impl EventCacheStore for MemoryStore {
364364
}
365365
}
366366

367-
#[cfg_attr(target_arch = "wasm32", async_trait(?Send))]
368-
#[cfg_attr(not(target_arch = "wasm32"), async_trait)]
367+
#[cfg_attr(target_family = "wasm", async_trait(?Send))]
368+
#[cfg_attr(not(target_family = "wasm"), async_trait)]
369369
impl EventCacheStoreMedia for MemoryStore {
370370
type Error = EventCacheStoreError;
371371

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,8 +204,8 @@ pub type Result<T, E = EventCacheStoreError> = std::result::Result<T, E>;
204204
#[derive(Clone, Debug)]
205205
struct LockableEventCacheStore(Arc<DynEventCacheStore>);
206206

207-
#[cfg_attr(target_arch = "wasm32", async_trait::async_trait(?Send))]
208-
#[cfg_attr(not(target_arch = "wasm32"), async_trait::async_trait)]
207+
#[cfg_attr(target_family = "wasm", async_trait::async_trait(?Send))]
208+
#[cfg_attr(not(target_family = "wasm"), async_trait::async_trait)]
209209
impl BackingStore for LockableEventCacheStore {
210210
type LockError = EventCacheStoreError;
211211

crates/matrix-sdk-base/src/event_cache/store/traits.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ pub const DEFAULT_CHUNK_CAPACITY: usize = 128;
3737

3838
/// An abstract trait that can be used to implement different store backends
3939
/// for the event cache of the SDK.
40-
#[cfg_attr(target_arch = "wasm32", async_trait(?Send))]
41-
#[cfg_attr(not(target_arch = "wasm32"), async_trait)]
40+
#[cfg_attr(target_family = "wasm", async_trait(?Send))]
41+
#[cfg_attr(not(target_family = "wasm"), async_trait)]
4242
pub trait EventCacheStore: AsyncTraitDeps {
4343
/// The error type used by this event cache store.
4444
type Error: fmt::Debug + Into<EventCacheStoreError>;
@@ -277,8 +277,8 @@ impl<T: fmt::Debug> fmt::Debug for EraseEventCacheStoreError<T> {
277277
}
278278
}
279279

280-
#[cfg_attr(target_arch = "wasm32", async_trait(?Send))]
281-
#[cfg_attr(not(target_arch = "wasm32"), async_trait)]
280+
#[cfg_attr(target_family = "wasm", async_trait(?Send))]
281+
#[cfg_attr(not(target_family = "wasm"), async_trait)]
282282
impl<T: EventCacheStore> EventCacheStore for EraseEventCacheStoreError<T> {
283283
type Error = EventCacheStoreError;
284284

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

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

1616
#![doc = include_str!("../README.md")]
1717
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
18-
#![cfg_attr(target_arch = "wasm32", allow(clippy::arc_with_non_send_sync))]
18+
#![cfg_attr(target_family = "wasm", allow(clippy::arc_with_non_send_sync))]
1919
#![warn(missing_docs, missing_debug_implementations)]
2020

2121
pub use matrix_sdk_common::*;

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ use crate::{
4747
///
4848
/// This trait is not meant to be used directly, but will be used with the
4949
/// `statestore_integration_tests!` macro.
50-
#[cfg_attr(target_arch = "wasm32", async_trait(?Send))]
51-
#[cfg_attr(not(target_arch = "wasm32"), async_trait)]
50+
#[cfg_attr(target_family = "wasm", async_trait(?Send))]
51+
#[cfg_attr(not(target_family = "wasm"), async_trait)]
5252
pub trait StateStoreIntegrationTests {
5353
/// Populate the given `StateStore`.
5454
async fn populate(&self) -> Result<()>;
@@ -98,8 +98,8 @@ pub trait StateStoreIntegrationTests {
9898
async fn test_get_room_infos(&self);
9999
}
100100

101-
#[cfg_attr(target_arch = "wasm32", async_trait(?Send))]
102-
#[cfg_attr(not(target_arch = "wasm32"), async_trait)]
101+
#[cfg_attr(target_family = "wasm", async_trait(?Send))]
102+
#[cfg_attr(not(target_family = "wasm"), async_trait)]
103103
impl StateStoreIntegrationTests for DynStateStore {
104104
async fn populate(&self) -> Result<()> {
105105
let mut changes = StateChanges::default();

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,8 @@ impl MemoryStore {
138138
}
139139
}
140140

141-
#[cfg_attr(target_arch = "wasm32", async_trait(?Send))]
142-
#[cfg_attr(not(target_arch = "wasm32"), async_trait)]
141+
#[cfg_attr(target_family = "wasm", async_trait(?Send))]
142+
#[cfg_attr(not(target_family = "wasm"), async_trait)]
143143
impl StateStore for MemoryStore {
144144
type Error = StoreError;
145145

0 commit comments

Comments
 (0)