Apply suggestions from code review

Co-authored-by: Jan-Erik Rediger <badboy@archlinux.us>
This commit is contained in:
Alessio Placitelli 2020-12-15 17:34:37 +01:00
Родитель 9220c62bc2
Коммит 4430ac02ed
3 изменённых файлов: 4 добавлений и 9 удалений

Просмотреть файл

@ -6,7 +6,7 @@
* Introduce the String List metric type in the RLB. [#1380](https://github.com/mozilla/glean/pull/1380).
* Introduce the `Datetime` metric type in the RLB [#1384](https://github.com/mozilla/glean/pull/1384).
* Introduce the `CustomDistribution` and `TimingDistribution` metric type in the RLB [#1394](https://github.com/mozilla/glean/pull/1394).
* Support ping registration before Glean initializes.
* Support ping registration before Glean initializes [#1393](https://github.com/mozilla/glean/pull/1393).
# v33.8.0 (2020-12-10)

Просмотреть файл

@ -225,7 +225,7 @@ Pings.search.Submit(
```Rust
use glean::Pings;
Pings::search.submit(Pings::searchReasonCodes::performed);
pings::search.submit(pings::SearchReasonCodes::Performed);
```
</div>

Просмотреть файл

@ -4,7 +4,6 @@
use crate::private::PingType;
use crate::private::{BooleanMetric, CounterMetric};
use once_cell::sync::Lazy;
use std::path::PathBuf;
use super::*;
@ -512,11 +511,7 @@ fn registering_pings_before_init_must_work() {
}
// Create a custom ping and attempt its registration.
#[allow(non_upper_case_globals)]
pub static SamplePing: Lazy<PingType> =
Lazy::new(|| PingType::new("pre-register", true, true, vec![]));
register_ping_type(&SamplePing);
let sample_ping = PingType::new("pre-register", true, true, vec![]);
// Create a custom configuration to use a fake uploader.
let dir = tempfile::tempdir().unwrap();
@ -537,7 +532,7 @@ fn registering_pings_before_init_must_work() {
crate::block_on_dispatcher();
// Submit a baseline ping.
SamplePing.submit(None);
sample_ping.submit(None);
// Wait for the ping to arrive.
let url = r.recv().unwrap();