Skip to content
This repository has been archived by the owner on Aug 6, 2019. It is now read-only.

Commit

Permalink
dump: Clean up the code a bit and make Clippy stop whining
Browse files Browse the repository at this point in the history
Signed-off-by: Kristofer Rye <kristofer.rye@gmail.com>
  • Loading branch information
rye committed Apr 15, 2019
1 parent d9b5b04 commit 7f80ccf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/dump.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ pub struct Dump {
}

impl Dump {
pub fn read<R: std::io::Read>(rdr: R) -> Dump {
pub fn read<R: std::io::Read>(rdr: R) -> Self {
let mut reader = csv::Reader::from_reader(rdr);

let mut plugins: HashSet<Plugin> = HashSet::new();
Expand Down Expand Up @@ -78,7 +78,7 @@ impl Dump {
detections.insert(record_detection);
});

Dump {
Self {
filename: "test".to_string(),
detections: detections.iter().cloned().collect(),
}
Expand Down
2 changes: 1 addition & 1 deletion src/dump/plugin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ pub struct Plugin {
}

impl PartialEq for Plugin {
fn eq(&self, other: &Plugin) -> bool {
fn eq(&self, other: &Self) -> bool {
let mut s = DefaultHasher::new();
let mut o = DefaultHasher::new();
self.hash(&mut s);
Expand Down

0 comments on commit 7f80ccf

Please sign in to comment.