diff options
Diffstat (limited to 'vendor/gix-commitgraph/src/file/access.rs')
-rw-r--r-- | vendor/gix-commitgraph/src/file/access.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/vendor/gix-commitgraph/src/file/access.rs b/vendor/gix-commitgraph/src/file/access.rs index d3c32d8bb..79a40d75d 100644 --- a/vendor/gix-commitgraph/src/file/access.rs +++ b/vendor/gix-commitgraph/src/file/access.rs @@ -74,7 +74,10 @@ impl File { /// Translate the given object hash to its position within this file, if present. // copied from gix-odb/src/pack/index/ext pub fn lookup(&self, id: impl AsRef<gix_hash::oid>) -> Option<file::Position> { - let id = id.as_ref(); + self.lookup_inner(id.as_ref()) + } + + fn lookup_inner(&self, id: &gix_hash::oid) -> Option<file::Position> { let first_byte = usize::from(id.first_byte()); let mut upper_bound = self.fan[first_byte]; let mut lower_bound = if first_byte != 0 { self.fan[first_byte - 1] } else { 0 }; |