Skip to content

Commit 1322336

Browse files
Remove serde derives from uddsketch
We don't really need them
1 parent 74206da commit 1322336

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

crates/udd-sketch/src/lib.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ use std::collections::HashMap;
99
use ordered_float::OrderedFloat;
1010
#[cfg(test)]
1111
use std::collections::HashSet;
12+
use serde::{Deserialize, Serialize};
1213

1314
#[cfg(test)]
1415
extern 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)]
8384
struct 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)]
9091
struct 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)]
257258
pub struct UDDSketch {
258259
buckets: SketchHashMap,
259260
alpha: f64,

0 commit comments

Comments
 (0)