diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:35:49 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:35:49 +0000 |
commit | d8bbc7858622b6d9c278469aab701ca0b609cddf (patch) | |
tree | eff41dc61d9f714852212739e6b3738b82a2af87 /toolkit/components/glean/api/src/ffi/event.rs | |
parent | Releasing progress-linux version 125.0.3-1~progress7.99u1. (diff) | |
download | firefox-d8bbc7858622b6d9c278469aab701ca0b609cddf.tar.xz firefox-d8bbc7858622b6d9c278469aab701ca0b609cddf.zip |
Merging upstream version 126.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'toolkit/components/glean/api/src/ffi/event.rs')
-rw-r--r-- | toolkit/components/glean/api/src/ffi/event.rs | 5 |
1 files changed, 1 insertions, 4 deletions
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() { |