Skip to content

Commit 3ef6b55

Browse files
committed
feat: add EntryRef::kind() as shortcut for EntryRef::mode().kind().
1 parent 8be3193 commit 3ef6b55

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

gix/src/object/tree/iter.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ impl<'repo, 'a> EntryRef<'repo, 'a> {
1515
self.inner.mode
1616
}
1717

18+
/// The kind of object to which [`id()`][Self::id()] is pointing, as shortcut to [self.mode().kind()](Self::mode()).
19+
pub fn kind(&self) -> gix_object::tree::EntryKind {
20+
self.inner.mode.kind()
21+
}
22+
1823
/// The name of the file in the parent tree.
1924
pub fn filename(&self) -> &gix_object::bstr::BStr {
2025
self.inner.filename

0 commit comments

Comments
 (0)