Make ID generator static (not const), updates CHANGES.md

This commit is contained in:
Francis Lalonde 2019-05-21 22:35:15 -04:00
parent c281012b5d
commit b229f3ce9a
2 changed files with 5 additions and 1 deletions

View File

@ -1,5 +1,9 @@
# Latest changes + history
- Move to Rust 2018 using cargo fix --edition and some manual help
- Fix nightly's 'acceptable regression' https://github.com/rust-lang/rust/pull/59825
- Give each flush listener a unique id
## version 0.7.5
- Fix leak on observers when registering same metric twice.
- Add `metric_id()` on `InputMetric`

View File

@ -137,7 +137,7 @@ pub struct ObserveWhen<'a, T, F> {
operation: Arc<F>,
}
const ID_GENERATOR: AtomicUsize = AtomicUsize::new(0);
static ID_GENERATOR: AtomicUsize = AtomicUsize::new(0);
pub struct OnFlushCancel(Arc<Fn()>);