Showing the changes to gix-commitgraph/src (1 of 32 files). Show all
Unified · Split
| @@ -156,7 +156,7 @@ impl File { · 155 unmodified lines | |||
| 156 | let data_len_without_trailer = self.data.len() - self.hash_len; | 156 | let data_len_without_trailer = self.data.len() - self.hash_len; |
| 157 | let mut hasher = gix_hash::hasher(self.object_hash()); | 157 | let mut hasher = gix_hash::hasher(self.object_hash()); |
| 158 | hasher.update(&self.data[..data_len_without_trailer]); | 158 | hasher.update(&self.data[..data_len_without_trailer]); |
| 159 | let actual = hasher.finalize(); | 159 | let actual = hasher.try_finalize()?; |
| 160 | actual.verify(self.checksum())?; | 160 | actual.verify(self.checksum())?; |
| 161 | Ok(actual) | 161 | Ok(actual) |
| 162 | } | 162 | } |