History

Remove re-export of git_object::borrowed::Id (#63)

Sebastian Thiel committed 5 years ago

Commit a3f28161 parent fdbe70422 files · +64 −69Browse files

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

Unified · Split

git-commitgraph/tests/commitgraph.rs+4−4
@@ -88,7 +88,7 @@ pub struct RefInfo { · 87 unmodified lines
88}88}
89 89
90impl RefInfo {90impl RefInfo {
91 pub fn id(&self) -> borrowed::Id {91 pub fn id(&self) -> git_hash::borrowed::Id {
92 self.id.to_borrowed()92 self.id.to_borrowed()
93 }93 }
94 94
@@ -96,11 +96,11 @@ impl RefInfo { · 1 unmodified line
96 self.pos96 self.pos
97 }97 }
98 98
99 pub fn parent_ids(&self) -> impl IntoIterator<Item = borrowed::Id> {99 pub fn parent_ids(&self) -> impl IntoIterator<Item = git_hash::borrowed::Id> {
100 self.parent_ids.iter().map(|x| x.to_borrowed())100 self.parent_ids.iter().map(|x| x.to_borrowed())
101 }101 }
102 102
103 pub fn root_tree_id(&self) -> borrowed::Id {103 pub fn root_tree_id(&self) -> git_hash::borrowed::Id {
104 self.root_tree_id.to_borrowed()104 self.root_tree_id.to_borrowed()
105 }105 }
106}106}
@@ -136,7 +136,7 @@ pub fn inspect_refs(repo_dir: impl AsRef<Path>, refs: &[&'static str]) -> HashMa · 29 unmodified lines
136 .collect();136 .collect();
137 infos.sort_by_key(|x| x.1);137 infos.sort_by_key(|x| x.1);
138 138
139 let get_pos = |id: borrowed::Id| -> GraphPosition {139 let get_pos = |id: git_hash::borrowed::Id| -> GraphPosition {
140 let pos: u32 = infos140 let pos: u32 = infos
141 .binary_search_by_key(&id, |x| x.1.to_borrowed())141 .binary_search_by_key(&id, |x| x.1.to_borrowed())
142 .expect("sorted_ids to contain id")142 .expect("sorted_ids to contain id")