History

Optimize usage of `hex_to_id()`

Remove it where possible, or make it private.

Sebastian Thiel committed 3 years ago

Commit 6fa950d1 parent 17c07766 files · +3 −20Browse files

Showing the changes to git-commitgraph/tests/commitgraph.rs (1 of 6 files). Show all

Unified · Split

git-commitgraph/tests/commitgraph.rs+0−4
@@ -65,10 +65,6 @@ pub fn make_readonly_repo(script_path: &str) -> std::path::PathBuf { · 64 unmodified lines
65 scripted_fixture_read_only(script_path).expect("script succeeds all the time")65 scripted_fixture_read_only(script_path).expect("script succeeds all the time")
66}66}
67 67
68pub fn hex_to_id(hex: &[u8]) -> git_hash::ObjectId {
69 git_hash::ObjectId::from_hex(hex).expect("40 bytes hex")
70}
71
72pub struct RefInfo {68pub struct RefInfo {
73 id: git_hash::ObjectId,69 id: git_hash::ObjectId,
74 parent_ids: Vec<git_hash::ObjectId>,70 parent_ids: Vec<git_hash::ObjectId>,