Skip to content

Commit 77ff0ac

Browse files
committed
fix(segment): allow unused_async on wasm32 mmap_view stub
The WASM stub for `mmap_view` must be `async` to match the native signature so callers compile without `#[cfg]` guards. Add `#[allow(clippy::unused_async)]` and a short doc note explaining why the async attribute is intentional.
1 parent c333c9d commit 77ff0ac

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/segment/reader.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,11 @@ impl<V: Vfs + Clone> SegmentReader<V> {
293293
}
294294

295295
/// WASM stub — always returns `PagedbError::Unsupported`.
296+
///
297+
/// Kept `async` to match the native `mmap_view` signature so callers compile
298+
/// unchanged on both targets; the stub itself has nothing to await.
296299
#[cfg(target_arch = "wasm32")]
300+
#[allow(clippy::unused_async)]
297301
pub async fn mmap_view(&self, _extent: ExtentRef) -> Result<MmapView> {
298302
Err(PagedbError::Unsupported)
299303
}

0 commit comments

Comments
 (0)