History

migrate hashing API users to fallible versions

Emily committed 1 year ago

Commit fbf6cc81 parent f2b07c032 files · +115 −84Browse files

Showing the changes to gix-commitgraph/src (1 of 32 files). Show all

Unified · Split

gix-commitgraph/src/file/verify.rs+1−1
@@ -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 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t