Showing the changes to git-commitgraph/src/file/commit.rs (1 of 4 files). Show all
Unified · Split
| @@ -43,7 +43,7 @@ impl<'a> Commit<'a> { · 42 unmodified lines | ||
| 43 | 43 | Commit { |
| 44 | 44 | file, |
| 45 | 45 | pos, |
| 46 | − root_tree_id: git_hash::oid::try_from(&bytes[..file.hash_len]).expect("hash bytes to be alright"), | |
| 46 | + root_tree_id: git_hash::oid::from_bytes_unchecked(&bytes[..file.hash_len]), | |
| 47 | 47 | parent1: ParentEdge::from_raw(BigEndian::read_u32(&bytes[file.hash_len..][..4])), |
| 48 | 48 | parent2: ParentEdge::from_raw(BigEndian::read_u32(&bytes[file.hash_len + 4..][..4])), |
| 49 | 49 | generation: BigEndian::read_u32(&bytes[file.hash_len + 8..][..4]) >> 2, |