From cb404940f95f76e5b5778c587436f8a9543fe96b Mon Sep 17 00:00:00 2001 From: Stephen Wakely Date: Tue, 4 Jul 2023 15:10:04 +0100 Subject: [PATCH] Udate the Derivative bounds Signed-off-by: Stephen Wakely --- lib/vector-common/src/internal_event/cached_event.rs | 4 ++-- lib/vector-core/src/stream/driver.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/vector-common/src/internal_event/cached_event.rs b/lib/vector-common/src/internal_event/cached_event.rs index c2e2e05d7e387..daa3f8ea803af 100644 --- a/lib/vector-common/src/internal_event/cached_event.rs +++ b/lib/vector-common/src/internal_event/cached_event.rs @@ -17,8 +17,8 @@ use super::{InternalEventHandle, RegisterInternalEvent}; /// new event is emitted for a previously unseen set of tags an event is registered /// and stored in the cache. #[derive(Derivative)] -#[derivative(Clone(bound = ""), Default(bound = "T: Default"))] -pub struct RegisteredEventCache { +#[derivative(Clone(bound = "T: Clone"))] +pub struct RegisteredEventCache { fixed_tags: T, cache: Arc< RwLock< diff --git a/lib/vector-core/src/stream/driver.rs b/lib/vector-core/src/stream/driver.rs index 4b234f9b4f344..1a1ce79e1b27a 100644 --- a/lib/vector-core/src/stream/driver.rs +++ b/lib/vector-core/src/stream/driver.rs @@ -99,7 +99,7 @@ where pin!(batched_input); let bytes_sent = protocol.map(|protocol| register(BytesSent { protocol })); - let events_sent = RegisteredEventCache::default(); + let events_sent = RegisteredEventCache::new(()); loop { // Core behavior of the loop: