Skip to content

Commit

Permalink
Fix wasm
Browse files Browse the repository at this point in the history
Signed-off-by: Xuanwo <[email protected]>
  • Loading branch information
Xuanwo committed Mar 13, 2024
1 parent 700e8e3 commit e8966fc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions core/src/raw/oio/list/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,10 @@ pub trait List: Unpin + Send + Sync {
///
/// `Ok(None)` means all pages have been returned. Any following call
/// to `next` will always get the same result.
#[cfg(not(target_arch = "wasm32"))]
fn next(&mut self) -> impl Future<Output = Result<Option<Entry>>> + Send;
#[cfg(target_arch = "wasm32")]
fn next(&mut self) -> impl Future<Output = Result<Option<Entry>>>;
}

impl List for () {
Expand Down
3 changes: 3 additions & 0 deletions core/src/raw/oio/list/page_list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ use crate::*;
/// PageList is the trait for lister that can fetch entries in pages.
pub trait PageList: Send + Sync + Unpin + 'static {
/// next_page is used to fetch next page of entries from underlying storage.
#[cfg(not(target_arch = "wasm32"))]
fn next_page(&self, ctx: &mut PageContext) -> impl Future<Output = Result<()>> + Send;
#[cfg(target_arch = "wasm32")]
fn next_page(&self, ctx: &mut PageContext) -> impl Future<Output = Result<()>>;
}

/// PageContext is the context passing between `PageList`.
Expand Down

0 comments on commit e8966fc

Please sign in to comment.