Skip to content

Commit a316f79

Browse files
committed
Explain reason for Refdb.
1 parent c4e033a commit a316f79

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/reference.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ use crate::{
1616
// internally
1717
const GIT_REFNAME_MAX: usize = 1024;
1818

19+
/// This is used to logically indicate that a [`raw::git_reference`] or
20+
/// [`raw::git_reference_iterator`] holds a reference to [`raw::git_refdb`].
21+
/// It is not necessary to have a wrapper like this in the
22+
/// [`marker::PhantomData`], since all that matters is that it is tied to the
23+
/// lifetime of the [`Repository`], but this helps distinguish the actual
24+
/// references involved.
1925
struct Refdb<'repo>(#[allow(dead_code)] &'repo Repository);
2026

2127
/// A structure to represent a git [reference][1].

0 commit comments

Comments
 (0)