about summary refs log tree commit diff
path: root/src/bootstrap/metrics.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/bootstrap/metrics.rs')
-rw-r--r--src/bootstrap/metrics.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/bootstrap/metrics.rs b/src/bootstrap/metrics.rs
index b73df7fe822..cf8d33dfcb0 100644
--- a/src/bootstrap/metrics.rs
+++ b/src/bootstrap/metrics.rs
@@ -40,6 +40,13 @@ pub(crate) struct BuildMetrics {
     state: RefCell<MetricsState>,
 }
 
+/// NOTE: this isn't really cloning anything, but `x suggest` doesn't need metrics so this is probably ok.
+impl Clone for BuildMetrics {
+    fn clone(&self) -> Self {
+        Self::init()
+    }
+}
+
 impl BuildMetrics {
     pub(crate) fn init() -> Self {
         let state = RefCell::new(MetricsState {