summaryrefslogtreecommitdiffstats
path: root/third_party/rust/glean-core/tests/custom_distribution.rs
diff options
context:
space:
mode:
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());