From aa62b70498c386e82b062e1aa5e7374e145c7250 Mon Sep 17 00:00:00 2001 From: Joshua Goins Date: Tue, 16 Apr 2024 21:27:41 -0400 Subject: [PATCH] Don't call unwrap() when reading Index2File --- src/index.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.rs b/src/index.rs index 559dcce..c8067e8 100755 --- a/src/index.rs +++ b/src/index.rs @@ -141,7 +141,7 @@ impl Index2File { pub fn from_existing(path: &str) -> Option { 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.