Skip to content

Commit 4ad12a0

Browse files
committed
fixup: Get FinderCryptoStore to compile on WASM too
1 parent deb0517 commit 4ad12a0

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

crates/matrix-sdk-crypto/src/olm/group_sessions/sender_data_finder.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,8 @@ impl<'a, S: FinderCryptoStore> SenderDataFinder<'a, S> {
347347
}
348348
}
349349

350-
#[async_trait]
350+
#[cfg_attr(target_arch = "wasm32", async_trait(?Send))]
351+
#[cfg_attr(not(target_arch = "wasm32"), async_trait)]
351352
pub(crate) trait FinderCryptoStore {
352353
async fn get_device_from_curve_key(
353354
&self,
@@ -361,7 +362,8 @@ pub(crate) trait FinderCryptoStore {
361362
) -> OlmResult<Option<ReadOnlyUserIdentities>>;
362363
}
363364

364-
#[async_trait]
365+
#[cfg_attr(target_arch = "wasm32", async_trait(?Send))]
366+
#[cfg_attr(not(target_arch = "wasm32"), async_trait)]
365367
impl FinderCryptoStore for Store {
366368
async fn get_device_from_curve_key(
367369
&self,
@@ -862,7 +864,8 @@ mod tests {
862864
}
863865
}
864866

865-
#[async_trait]
867+
#[cfg_attr(target_arch = "wasm32", async_trait(?Send))]
868+
#[cfg_attr(not(target_arch = "wasm32"), async_trait)]
866869
impl FinderCryptoStore for FakeCryptoStore {
867870
async fn get_device_from_curve_key(
868871
&self,

0 commit comments

Comments
 (0)