Skip to content

Commit 69a5a11

Browse files
committed
feat: derive Hash for Snapshot
1 parent c497305 commit 69a5a11

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

gix-mailmap/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ pub mod snapshot;
4343
/// something that should be very rare but is possible, we decided to not expose this fallibility in the API.
4444
/// Hence, the user may separately check for the correctness of `time`, which we replace with [`gix_date::Time::default()`]
4545
/// in case of parse errors.
46-
#[derive(Default, Clone, Debug, Eq, PartialEq, std::hash::Hash)]
46+
#[derive(Default, Clone, Debug, Eq, PartialEq, Hash)]
4747
pub struct Snapshot {
4848
/// Sorted by `old_email`
4949
entries_by_old_email: Vec<snapshot::EmailEntry>,

gix-mailmap/src/snapshot/entry.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ use bstr::BString;
22

33
use crate::snapshot::util::{EncodedString, EncodedStringRef};
44

5-
#[derive(Clone, Debug, Eq, PartialEq, std::hash::Hash)]
5+
#[derive(Clone, Debug, Eq, PartialEq, Hash)]
66
pub(crate) struct NameEntry {
77
pub(crate) new_name: Option<BString>,
88
pub(crate) new_email: Option<BString>,
99
pub(crate) old_name: EncodedString,
1010
}
1111

12-
#[derive(Clone, Debug, Eq, PartialEq, std::hash::Hash)]
12+
#[derive(Clone, Debug, Eq, PartialEq, Hash)]
1313
pub(crate) struct EmailEntry {
1414
pub(crate) new_name: Option<BString>,
1515
pub(crate) new_email: Option<BString>,

gix-mailmap/src/snapshot/util.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use std::{cmp::Ordering, ops::Deref};
22

33
use bstr::{BStr, BString, ByteSlice};
44

5-
#[derive(Clone, Debug, Eq, PartialEq, std::hash::Hash)]
5+
#[derive(Clone, Debug, Eq, PartialEq, Hash)]
66
pub enum EncodedString {
77
Utf8(String),
88
Unknown(BString),

0 commit comments

Comments
 (0)