diff --git a/crates/wasi-common/tokio/src/file.rs b/crates/wasi-common/tokio/src/file.rs index fa63fe8b09..503e2168c4 100644 --- a/crates/wasi-common/tokio/src/file.rs +++ b/crates/wasi-common/tokio/src/file.rs @@ -173,7 +173,8 @@ impl WasiFile for File { Ok(n.try_into()?) } async fn seek(&self, pos: std::io::SeekFrom) -> Result { - asyncify(move || self.0.seek(pos)).await + use tokio::io::AsyncSeekExt; + Ok(self.0.inner().seek(pos).await?) } async fn peek(&self, buf: &mut [u8]) -> Result { let n = asyncify(move || self.0.peek(buf)).await?;