B:BD[
2.11092] → [
2.11092:11166]
tokio::fs::hard_link(&elt, &to.join(&p)).await.unwrap_or(());
let to_p = to.join(&p);
tokio::fs::hard_link(&elt, &to_p).await.unwrap_or(());
let p = p.to_path_buf();
hashing.push(tokio::spawn(async move {
// hash + write
info!("hashing {:?}", to_p);
if let Ok(file) = tokio::fs::File::open(&to_p).await {
let mut hasher = blake3::Hasher::new();
hash_reader(file, &mut hasher).await.unwrap();
let hex = data_encoding::HEXLOWER.encode(hasher.finalize().as_bytes());
Ok::<_, Error>(Some((p, hex)))
} else {
Ok(None)
}
}));