1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
use crate::easy;
pub trait Sealed {}
impl Sealed for git_ref::Reference {}
/// Extensions for [references][git_ref::Reference].
pub trait ReferenceExt {
/// Attach [`easy::Handle`] to the given reference. It can be detached later with [`detach()]`.
fn attach(self, handle: &easy::Handle) -> easy::Reference<'_>;
}
impl ReferenceExt for git_ref::Reference {
fn attach(self, handle: &easy::Handle) -> easy::Reference<'_> {
easy::Reference::from_ref(self, handle)
}
}