diff --git a/crates/radicle-git-metadata/src/commit.rs b/crates/radicle-git-metadata/src/commit.rs index 5ccab788..e33a21a5 100644 --- a/crates/radicle-git-metadata/src/commit.rs +++ b/crates/radicle-git-metadata/src/commit.rs @@ -11,7 +11,7 @@ use crate::author::Author; /// A git commit in its object description form, i.e. the output of /// `git cat-file` for a commit object. -#[derive(Debug)] +#[derive(Clone, Debug, PartialEq, Eq, Hash)] pub struct CommitData { tree: Tree, parents: Vec, diff --git a/crates/radicle-git-metadata/src/commit/headers.rs b/crates/radicle-git-metadata/src/commit/headers.rs index 35ac01b8..9dc5c7d2 100644 --- a/crates/radicle-git-metadata/src/commit/headers.rs +++ b/crates/radicle-git-metadata/src/commit/headers.rs @@ -7,7 +7,7 @@ const BEGIN_PGP: &str = "-----BEGIN PGP SIGNATURE-----\n"; /// A collection of headers stored in [`super::CommitData`]. /// /// Note: these do not include `tree`, `parent`, `author`, and `committer`. -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug, Default, PartialEq, Eq, Hash)] pub struct Headers(pub(super) Vec<(String, String)>); /// A `gpgsig` signature stored in [`super::CommitData`]. diff --git a/crates/radicle-git-metadata/src/commit/trailers.rs b/crates/radicle-git-metadata/src/commit/trailers.rs index 797d56dd..357e43ba 100644 --- a/crates/radicle-git-metadata/src/commit/trailers.rs +++ b/crates/radicle-git-metadata/src/commit/trailers.rs @@ -85,13 +85,13 @@ impl<'a> Trailer<'a> { /// A version of the [`Trailer`] which owns its token and /// value. Useful for when you need to carry trailers around in a long /// lived data structure. -#[derive(Debug)] +#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] pub struct OwnedTrailer { pub token: OwnedToken, pub value: String, } -#[derive(Debug)] +#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] pub struct OwnedToken(String); impl Deref for OwnedToken {