From a2679aee9f2a9a89f494b08f6fcd1d52ac195dbe Mon Sep 17 00:00:00 2001 From: Dom Dwyer Date: Mon, 20 Feb 2023 20:31:35 +0100 Subject: [PATCH] refactor: derive Clone on iox_time::SystemProvider This lets us use a SystemProvider without wrapping it in an Arc to satisfy a Clone bound. There's no reason to be wrapping this in an Arc and maintaining refcounts for a stateless trait impl struct that doesn't have any data to reference count or drop. --- iox_time/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iox_time/src/lib.rs b/iox_time/src/lib.rs index 55520b0dde..98e06079af 100644 --- a/iox_time/src/lib.rs +++ b/iox_time/src/lib.rs @@ -213,7 +213,7 @@ pub trait TimeProvider: std::fmt::Debug + Send + Sync + 'static { } /// A [`TimeProvider`] that uses [`Utc::now`] as a clock source -#[derive(Debug, Default)] +#[derive(Debug, Default, Clone)] pub struct SystemProvider {} impl SystemProvider {