summaryrefslogtreecommitdiffstats
path: root/third_party/rust/glean-core/tests/custom_distribution.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:27 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:27 +0000
commit40a355a42d4a9444dc753c04c6608dade2f06a23 (patch)
tree871fc667d2de662f171103ce5ec067014ef85e61 /third_party/rust/glean-core/tests/custom_distribution.rs
parentAdding upstream version 124.0.1. (diff)
downloadfirefox-upstream/125.0.1.tar.xz
firefox-upstream/125.0.1.zip
Adding upstream version 125.0.1.upstream/125.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'third_party/rust/glean-core/tests/custom_distribution.rs')
-rw-r--r--third_party/rust/glean-core/tests/custom_distribution.rs20
1 files changed, 10 insertions, 10 deletions
diff --git a/third_party/rust/glean-core/tests/custom_distribution.rs b/third_party/rust/glean-core/tests/custom_distribution.rs
index 43c69fb26d..4cdfa5e99b 100644
--- a/third_party/rust/glean-core/tests/custom_distribution.rs
+++ b/third_party/rust/glean-core/tests/custom_distribution.rs
@@ -40,7 +40,7 @@ mod linear {
HistogramType::Linear,
);
- metric.accumulate_samples_sync(&glean, vec![50]);
+ metric.accumulate_samples_sync(&glean, &[50]);
let snapshot = metric
.get_value(&glean, "store1")
@@ -84,7 +84,7 @@ mod linear {
HistogramType::Linear,
);
- metric.accumulate_samples_sync(&glean, vec![50]);
+ metric.accumulate_samples_sync(&glean, &[50]);
for store_name in store_names {
let snapshot = StorageManager
@@ -126,7 +126,7 @@ mod linear {
// Accumulate the samples. We intentionally do not report
// negative values to not trigger error reporting.
- metric.accumulate_samples_sync(&glean, [1, 2, 3].to_vec());
+ metric.accumulate_samples_sync(&glean, &[1, 2, 3]);
let snapshot = metric
.get_value(&glean, "store1")
@@ -168,7 +168,7 @@ mod linear {
);
// Accumulate the samples.
- metric.accumulate_samples_sync(&glean, [-1, 1, 2, 3].to_vec());
+ metric.accumulate_samples_sync(&glean, &[-1, 1, 2, 3]);
let snapshot = metric
.get_value(&glean, "store1")
@@ -209,7 +209,7 @@ mod linear {
HistogramType::Linear,
);
- metric.accumulate_samples_sync(&glean, vec![50]);
+ metric.accumulate_samples_sync(&glean, &[50]);
let snapshot = metric.get_value(&glean, "store1");
assert!(snapshot.is_some());
@@ -242,7 +242,7 @@ mod exponential {
HistogramType::Exponential,
);
- metric.accumulate_samples_sync(&glean, vec![50]);
+ metric.accumulate_samples_sync(&glean, &[50]);
let snapshot = metric
.get_value(&glean, "store1")
@@ -286,7 +286,7 @@ mod exponential {
HistogramType::Exponential,
);
- metric.accumulate_samples_sync(&glean, vec![50]);
+ metric.accumulate_samples_sync(&glean, &[50]);
for store_name in store_names {
let snapshot = StorageManager
@@ -328,7 +328,7 @@ mod exponential {
// Accumulate the samples. We intentionally do not report
// negative values to not trigger error reporting.
- metric.accumulate_samples_sync(&glean, [1, 2, 3].to_vec());
+ metric.accumulate_samples_sync(&glean, &[1, 2, 3]);
let snapshot = metric
.get_value(&glean, "store1")
@@ -370,7 +370,7 @@ mod exponential {
);
// Accumulate the samples.
- metric.accumulate_samples_sync(&glean, [-1, 1, 2, 3].to_vec());
+ metric.accumulate_samples_sync(&glean, &[-1, 1, 2, 3]);
let snapshot = metric
.get_value(&glean, "store1")
@@ -411,7 +411,7 @@ mod exponential {
HistogramType::Exponential,
);
- metric.accumulate_samples_sync(&glean, vec![50]);
+ metric.accumulate_samples_sync(&glean, &[50]);
let snapshot = metric.get_value(&glean, "store1");
assert!(snapshot.is_some());