Skip to content

Commit 579a6f2

Browse files
cruesslerByron
authored andcommitted
Replace FindExt by Find
1 parent 32632e9 commit 579a6f2

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

gix-object/src/tree/ref_iter.rs

+6-4
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ impl<'a> TreeRefIter<'a> {
2323
///
2424
pub fn lookup_entry<I, P>(
2525
&self,
26-
odb: impl crate::FindExt,
26+
odb: impl crate::Find,
2727
buffer: &'a mut Vec<u8>,
2828
path: I,
2929
) -> Result<Option<tree::Entry>, Error>
@@ -45,9 +45,11 @@ impl<'a> TreeRefIter<'a> {
4545
return Ok(Some(entry.into()));
4646
} else {
4747
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);
48+
let obj = odb.try_find(&next_id, buffer)?;
49+
if let Some(obj) = obj {
50+
if !obj.kind.is_tree() {
51+
return Ok(None);
52+
}
5153
}
5254
}
5355
}

0 commit comments

Comments
 (0)