Skip to content

Commit 00da702

Browse files
Merge pull request #739 from wcampbell0x2a/use-std-black-box
2 parents ad97289 + 82d655f commit 00da702

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

backhand/benches/benchmark.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ fn read_write(file: File, offset: u64) {
1717

1818
// convert to bytes
1919
let mut output = Cursor::new(vec![]);
20-
black_box(new_filesystem.write(&mut output).unwrap());
20+
std::hint::black_box(new_filesystem.write(&mut output).unwrap());
2121
}
2222

2323
fn read(file: File, offset: u64) {
2424
let file = BufReader::new(file);
25-
black_box(FilesystemReader::from_reader_with_offset(file, offset).unwrap());
25+
std::hint::black_box(FilesystemReader::from_reader_with_offset(file, offset).unwrap());
2626
}
2727

2828
pub fn bench_read_write(c: &mut Criterion) {

0 commit comments

Comments
 (0)