Skip to content

Commit

Permalink
weird debug attempt
Browse files Browse the repository at this point in the history
  • Loading branch information
Le0X8 committed Nov 13, 2024
1 parent cbc989e commit 994c7a4
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/hash/murmur3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,18 @@ use murmur3::murmur3_32;
use std::io::Result;

pub fn hash<'a>(file: &'a mut dyn Readable<'a>, offset: u64, size: u64) -> Result<u32> {
println!("checkpoint 1");
let pos_before = file.pos()?;

println!("checkpoint 2");
let mut limited = file.limit(offset, size)?;

println!("checkpoint 3");
let result = murmur3_32(&mut limited, 0x31082007)?;
println!("checkpoint 4");
let file = limited.unlimit();

println!("checkpoint 5");
file.to(pos_before)?;

println!("checkpoint 6");
Ok(result)
}

0 comments on commit 994c7a4

Please sign in to comment.