Skip to content

Commit

Permalink
Explain reason for Refdb.
Browse files Browse the repository at this point in the history
  • Loading branch information
ehuss committed Jan 11, 2024
1 parent c4e033a commit a316f79
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/reference.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ use crate::{
// internally
const GIT_REFNAME_MAX: usize = 1024;

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

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

0 comments on commit a316f79

Please sign in to comment.