Skip to content

Commit 6ac7dbe

Browse files
committed
refactor (#470)
1 parent 3925298 commit 6ac7dbe

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

git-repository/src/object/tree.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ impl<'repo> Tree<'repo> {
3737
I: IntoIterator<Item = P>,
3838
P: PartialEq<BStr>,
3939
{
40-
// let mut out = None;
4140
let mut path = path.into_iter().peekable();
4241
while let Some(component) = path.next() {
4342
match TreeRefIter::from_bytes(&self.data)
@@ -49,9 +48,9 @@ impl<'repo> Tree<'repo> {
4948
return Ok(Some(entry.into()));
5049
} else {
5150
let next_id = entry.oid.to_owned();
52-
let handle = self.repo;
51+
let repo = self.repo;
5352
drop(self);
54-
self = match handle.find_object(next_id)?.try_into_tree() {
53+
self = match repo.find_object(next_id)?.try_into_tree() {
5554
Ok(tree) => tree,
5655
Err(_) => return Ok(None),
5756
};

0 commit comments

Comments
 (0)