We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 397b4ae commit 3f94c51Copy full SHA for 3f94c51
src/info/repo.rs
@@ -24,7 +24,6 @@ pub struct Repo<'a> {
24
time_of_first_commit: git::actor::Time,
25
}
26
27
-#[derive(Hash)]
28
pub struct Sig {
29
name: git::bstr::BString,
30
email: git::bstr::BString,
@@ -43,6 +42,15 @@ impl From<git::actor::Signature> for Sig {
43
42
44
45
+impl std::hash::Hash for Sig {
46
+ fn hash<H: std::hash::Hasher>(&self, state: &mut H) {
47
+ self.email_lowercase
48
+ .as_ref()
49
+ .map(|email_lc| email_lc.hash(state))
50
+ .unwrap_or_else(|| self.email.hash(state))
51
+ }
52
+}
53
+
54
impl Eq for Sig {}
55
56
impl PartialEq<Self> for Sig {
0 commit comments