mirror of
https://github.com/pezkuwichain/pezkuwi-telemetry.git
synced 2026-07-14 21:25:46 +00:00
Handle removing a node, and a shard disconnecting (bulk remove)
This commit is contained in:
@@ -10,7 +10,13 @@ pub struct MostSeen<T> {
|
||||
others: HashMap<T, usize>
|
||||
}
|
||||
|
||||
impl <T: Hash + Eq> MostSeen<T> {
|
||||
impl <T: Default> Default for MostSeen<T> {
|
||||
fn default() -> Self {
|
||||
MostSeen::new(T::default())
|
||||
}
|
||||
}
|
||||
|
||||
impl <T> MostSeen<T> {
|
||||
pub fn new(item: T) -> Self {
|
||||
Self {
|
||||
current_best: item,
|
||||
|
||||
Reference in New Issue
Block a user