letsz: usize=file.metadata()?.len().try_into().or(Err(error::Error::Arch(Some("Filesize is too large to be known. you have likely compiled the binary for 32-bit architecture or less. This shouldn't happen on 64-bit systems."))))?;
letpath=path.as_ref();
ifletSome(&hash)=set.get_cache(path){
Ok(set.try_add(hash))
}else{
letmutfile=OpenOptions::new()
.read(true)
.open(path)?;
letsz: usize=file.metadata()?.len().try_into().or(Err(error::Error::Arch(Some("Filesize is too large to be known. you have likely compiled the binary for 32-bit architecture or less. This shouldn't happen on 64-bit systems."))))?;
letsz: usize=file.metadata().await?.len().try_into().or(Err(error::Error::Arch(Some("Filesize is too large to be known. you have likely compiled the binary for 32-bit architecture or less. This shouldn't happen on 64-bit systems."))))?;
letpath=path.as_ref();
ifletSome(hash)={
letset=set.lock().await;
set.get_cache(path).and_then(|&h|Some(h))
}{
letmutset=set.lock().await;
Ok(set.try_add(hash))
}else{
letmutfile=OpenOptions::new()
.read(true)
.open(path).await?;
letsz: usize=file.metadata().await?.len().try_into().or(Err(error::Error::Arch(Some("Filesize is too large to be known. you have likely compiled the binary for 32-bit architecture or less. This shouldn't happen on 64-bit systems."))))?;