Skip to content

Commit

Permalink
Replace FindExt by Find
Browse files Browse the repository at this point in the history
  • Loading branch information
cruessler committed Nov 24, 2024
1 parent 3942757 commit 24b0e7f
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions gix-object/src/tree/ref_iter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ impl<'a> TreeRefIter<'a> {
///
pub fn lookup_entry<I, P>(
&self,
odb: impl crate::FindExt,
odb: impl crate::Find,
buffer: &'a mut Vec<u8>,
path: I,
) -> Result<Option<tree::Entry>, Error>
Expand All @@ -45,9 +45,11 @@ impl<'a> TreeRefIter<'a> {
return Ok(Some(entry.into()));
} else {
let next_id = entry.oid.to_owned();
let obj = odb.find(&next_id, buffer)?;
if !obj.kind.is_tree() {
return Ok(None);
let obj = odb.try_find(&next_id, buffer)?;
if let Some(obj) = obj {
if !obj.kind.is_tree() {
return Ok(None);
}
}
}
}
Expand Down

0 comments on commit 24b0e7f

Please sign in to comment.