@@ -9,6 +9,7 @@ use std::collections::HashMap;
99use ordered_float:: OrderedFloat ;
1010#[ cfg( test) ]
1111use std:: collections:: HashSet ;
12+ use serde:: { Deserialize , Serialize } ;
1213
1314#[ cfg( test) ]
1415extern crate quickcheck;
@@ -79,14 +80,14 @@ impl SketchHashKey {
7980}
8081
8182// Entries in the SketchHashMap contain a count and the next valid index of the map.
82- #[ derive( Serialize , Deserialize , Debug , Clone , PartialEq ) ]
83+ #[ derive( Debug , Clone , PartialEq ) ]
8384struct SketchHashEntry {
8485 count : u64 ,
8586 next : SketchHashKey ,
8687}
8788
8889// SketchHashMap is a special hash map of SketchHashKey->count that also keeps the equivalent of a linked list of the entries by increasing key value.
89- #[ derive( Serialize , Deserialize , Debug , Clone , PartialEq ) ]
90+ #[ derive( Debug , Clone , PartialEq ) ]
9091struct SketchHashMap {
9192 map : HashMap < SketchHashKey , SketchHashEntry > ,
9293 head : SketchHashKey ,
@@ -253,7 +254,7 @@ impl SketchHashMap {
253254 }
254255}
255256
256- #[ derive( Serialize , Deserialize , Clone , Debug , PartialEq ) ]
257+ #[ derive( Clone , Debug , PartialEq ) ]
257258pub struct UDDSketch {
258259 buckets : SketchHashMap ,
259260 alpha : f64 ,
0 commit comments