From 117f54b92876d3f045a9cbf3758311e752bfe8fc Mon Sep 17 00:00:00 2001 From: shuiyisong Date: Thu, 25 Jan 2024 17:09:01 +0800 Subject: [PATCH] chore: fix cr --- meter-example/src/collector.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meter-example/src/collector.rs b/meter-example/src/collector.rs index b571e08..11bdec4 100644 --- a/meter-example/src/collector.rs +++ b/meter-example/src/collector.rs @@ -94,7 +94,7 @@ where schema: record.schema.clone(), }; - let mut entry = self.read_data.entry(schema_id).or_insert_with(Vec::new); + let mut entry = self.read_data.entry(schema_id).or_default(); entry.push(record) } @@ -105,7 +105,7 @@ where schema: record.schema.clone(), }; - let mut entry = self.write_data.entry(schema_id).or_insert_with(Vec::new); + let mut entry = self.write_data.entry(schema_id).or_default(); entry.push(record) }