Skip to content

Commit

Permalink
fix(bench): reduce warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Berrysoft committed Mar 11, 2024
1 parent 155c225 commit 1fe9b6f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion compio/benches/fs.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#[cfg(windows)]
use std::io::Seek;
use std::{
io::{Read, Seek, SeekFrom, Write},
io::{Read, SeekFrom, Write},
path::Path,
};

Expand Down Expand Up @@ -199,6 +201,7 @@ fn read(c: &mut Criterion) {

fn write_std(b: &mut Bencher, (path, offsets, content): &(&Path, &[u64], &[u8])) {
b.iter(|| {
#[allow(unused_mut)]
let mut file = std::fs::OpenOptions::new().write(true).open(path).unwrap();
for &offset in *offsets {
#[cfg(windows)]
Expand Down

0 comments on commit 1fe9b6f

Please sign in to comment.