We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 32632e9 commit 579a6f2Copy full SHA for 579a6f2
gix-object/src/tree/ref_iter.rs
@@ -23,7 +23,7 @@ impl<'a> TreeRefIter<'a> {
23
///
24
pub fn lookup_entry<I, P>(
25
&self,
26
- odb: impl crate::FindExt,
+ odb: impl crate::Find,
27
buffer: &'a mut Vec<u8>,
28
path: I,
29
) -> Result<Option<tree::Entry>, Error>
@@ -45,9 +45,11 @@ impl<'a> TreeRefIter<'a> {
45
return Ok(Some(entry.into()));
46
} else {
47
let next_id = entry.oid.to_owned();
48
- let obj = odb.find(&next_id, buffer)?;
49
- if !obj.kind.is_tree() {
50
- return Ok(None);
+ let obj = odb.try_find(&next_id, buffer)?;
+ if let Some(obj) = obj {
+ if !obj.kind.is_tree() {
51
+ return Ok(None);
52
+ }
53
}
54
55
0 commit comments