1
Fork 0
mirror of https://github.com/redstrate/Physis.git synced 2025-04-22 20:57:46 +00:00

Don't call unwrap() when reading Index2File

This commit is contained in:
Joshua Goins 2024-04-16 21:27:41 -04:00
parent eeebc3e0f0
commit aa62b70498

View file

@ -141,7 +141,7 @@ impl Index2File {
pub fn from_existing(path: &str) -> Option<Self> {
let mut index_file = std::fs::File::open(path).ok()?;
Some(Self::read(&mut index_file).unwrap())
Self::read(&mut index_file).ok()
}
/// Calculates a hash for `index2` files from a game path.