Ver código fonte

event_grap: generic T to be Send and Sync as well in Seen

Dastan-glitch 3 anos atrás
pai
commit
d58b1266cf
1 arquivos alterados com 1 adições e 1 exclusões
  1. 1 1
      src/event_graph/protocol_event.rs

+ 1 - 1
src/event_graph/protocol_event.rs

@@ -63,7 +63,7 @@ pub struct Seen<T> {
     seen: Mutex<RingBuffer<T, SIZE_OF_SEEN_BUFFER>>,
     seen: Mutex<RingBuffer<T, SIZE_OF_SEEN_BUFFER>>,
 }
 }
 
 
-impl<T: Eq + PartialEq + Clone> Seen<T> {
+impl<T: Send + Sync + Eq + PartialEq + Clone> Seen<T> {
     pub fn new() -> SeenPtr<T> {
     pub fn new() -> SeenPtr<T> {
         Arc::new(Self { seen: Mutex::new(RingBuffer::new()) })
         Arc::new(Self { seen: Mutex::new(RingBuffer::new()) })
     }
     }