Skip to content

Commit

Permalink
fix type error
Browse files Browse the repository at this point in the history
  • Loading branch information
adrian-kong committed Sep 25, 2023
1 parent afcaae9 commit d1cb4bd
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions crates/esthri/src/ops/download.rs
Original file line number Diff line number Diff line change
Expand Up @@ -211,13 +211,11 @@ async fn init_download_dir(path: &Path) -> Result<PathBuf> {
#[cfg(unix)]
async fn write_all_at(file: Arc<std::fs::File>, buf: Bytes, offset: u64) -> Result<()> {
use std::os::unix::prelude::FileExt;

tokio::task::spawn_blocking(move || {
file.write_all_at(&buf, offset)?;
Ok(())
})
.await??;
Ok(())
.await?
}

#[cfg(windows)]
Expand Down

0 comments on commit d1cb4bd

Please sign in to comment.