From d8bbc7858622b6d9c278469aab701ca0b609cddf Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 15 May 2024 05:35:49 +0200 Subject: Merging upstream version 126.0. Signed-off-by: Daniel Baumann --- toolkit/components/glean/api/src/ffi/event.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'toolkit/components/glean/api/src/ffi/event.rs') diff --git a/toolkit/components/glean/api/src/ffi/event.rs b/toolkit/components/glean/api/src/ffi/event.rs index bd167021d6..5d1e2dc0f1 100644 --- a/toolkit/components/glean/api/src/ffi/event.rs +++ b/toolkit/components/glean/api/src/ffi/event.rs @@ -4,8 +4,6 @@ #![cfg(feature = "with_gecko")] -use std::collections::HashMap; - use nsstring::{nsACString, nsCString}; use thin_vec::ThinVec; @@ -59,7 +57,6 @@ pub extern "C" fn fog_event_record( Some(m) => m.record_raw(extra), None => panic!("No (dynamic) metric for event with id {}", id), } - return; } else { match metric_maps::record_event_by_id(id, extra) { Ok(()) => {} @@ -148,7 +145,7 @@ pub extern "C" fn fog_event_test_get_value( }; for event in events { - let extra = event.extra.unwrap_or_else(HashMap::new); + let extra = event.extra.unwrap_or_default(); let extra_len = extra.len(); let mut extras = ThinVec::with_capacity(extra_len * 2); for (k, v) in extra.into_iter() { -- cgit v1.2.3