Skip to content

Commit

Permalink
fix: Fix async_trait for SDK records (#208)
Browse files Browse the repository at this point in the history
  • Loading branch information
sugyan authored Aug 12, 2024
1 parent 5f2e10f commit 8a84482
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions bsky-sdk/src/record.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ use atrium_api::com::atproto::repo::{create_record, get_record, list_records, pu
use atrium_api::types::{Collection, LimitedNonZeroU8, TryIntoUnknown};
use atrium_api::xrpc::XrpcClient;

#[async_trait]
#[cfg_attr(target_arch = "wasm32", async_trait(?Send))]
#[cfg_attr(not(target_arch = "wasm32"), async_trait)]
pub trait Record<T, S>
where
T: XrpcClient + Send + Sync,
Expand All @@ -28,7 +29,8 @@ where

macro_rules! record_impl {
($collection:path, $record:path, $record_data:path) => {
#[async_trait]
#[cfg_attr(target_arch = "wasm32", async_trait(?Send))]
#[cfg_attr(not(target_arch = "wasm32"), async_trait)]
impl<T, S> Record<T, S> for $record
where
T: XrpcClient + Send + Sync,
Expand Down Expand Up @@ -143,7 +145,8 @@ macro_rules! record_impl {
}
}

#[async_trait]
#[cfg_attr(target_arch = "wasm32", async_trait(?Send))]
#[cfg_attr(not(target_arch = "wasm32"), async_trait)]
impl<T, S> Record<T, S> for $record_data
where
T: XrpcClient + Send + Sync,
Expand Down

0 comments on commit 8a84482

Please sign in to comment.