Skip to content

Commit 6fabb67

Browse files
committed
We can just derive PartialEq, no need for our own implementation
1 parent feb2db4 commit 6fabb67

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

src/main.rs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ extern crate git2;
55
extern crate structopt;
66

77
use git2::{Commit, Repository};
8-
use std::cmp;
98
use std::collections::HashMap;
109
use std::env;
1110
use std::error::Error;
@@ -67,7 +66,7 @@ impl Repo {
6766
}
6867
}
6968

70-
#[derive(Debug, Eq)]
69+
#[derive(Debug, Eq, PartialEq)]
7170
struct Author {
7271
name: String,
7372
total_commits: usize,
@@ -85,12 +84,6 @@ impl fmt::Display for Author {
8584
}
8685
}
8786

88-
impl cmp::PartialEq for Author {
89-
fn eq(&self, other: &Author) -> bool {
90-
self.name == other.name
91-
}
92-
}
93-
9487
impl Author {
9588
fn new(name: &str) -> Self {
9689
let name = name.to_string();

0 commit comments

Comments
 (0)