diff --git a/src/dump.rs b/src/dump.rs index 7573457..948f8f8 100644 --- a/src/dump.rs +++ b/src/dump.rs @@ -18,7 +18,7 @@ pub struct Dump { } impl Dump { - pub fn read(rdr: R) -> Dump { + pub fn read(rdr: R) -> Self { let mut reader = csv::Reader::from_reader(rdr); let mut plugins: HashSet = HashSet::new(); @@ -78,7 +78,7 @@ impl Dump { detections.insert(record_detection); }); - Dump { + Self { filename: "test".to_string(), detections: detections.iter().cloned().collect(), } diff --git a/src/dump/plugin.rs b/src/dump/plugin.rs index 39e4d38..881f473 100644 --- a/src/dump/plugin.rs +++ b/src/dump/plugin.rs @@ -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);