Skip to content

Commit

Permalink
Remove the extra check.
Browse files Browse the repository at this point in the history
  • Loading branch information
Narsil committed Jan 7, 2025
1 parent d790e44 commit dcbe07d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/api/tokio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -678,12 +678,12 @@ impl ApiRepo {
.write(true)
.open(&filename)?;
f
.set_len(length as u64);
let metadata = tokio::fs::OpenOptions::new()
.write(true)
.open(&filename)
.await?.metadata().await?;
assert_eq!(metadata.len(), length as u64);
.set_len(length as u64)?;
// let metadata = tokio::fs::OpenOptions::new()
// .write(true)
// .open(&filename)
// .await?.metadata().await?;
// assert_eq!(metadata.len(), length as u64);

println!("Truncated file {filename:?} to {length}");
progressbar.finish().await;
Expand Down

0 comments on commit dcbe07d

Please sign in to comment.