Loading libstats/pull_rust/Android.bp +0 −1 Original line number Diff line number Diff line Loading @@ -61,7 +61,6 @@ rust_library { srcs: ["stats_pull.rs"], rustlibs: [ "liblog_rust", "libonce_cell", "libstatslog_rust_header", "libstatspull_bindgen", ], Loading libstats/pull_rust/stats_pull.rs +3 −4 Original line number Diff line number Diff line Loading @@ -14,13 +14,12 @@ //! A Rust interface for the StatsD pull API. use once_cell::sync::Lazy; use statslog_rust_header::{Atoms, Stat, StatsError}; use statspull_bindgen::*; use std::collections::HashMap; use std::convert::TryInto; use std::os::raw::c_void; use std::sync::Mutex; use std::sync::{LazyLock, Mutex}; /// The return value of callbacks. pub type StatsPullResult = Vec<Box<dyn Stat>>; Loading Loading @@ -107,8 +106,8 @@ impl Default for Metadata { } } static COOKIES: Lazy<Mutex<HashMap<i32, fn() -> StatsPullResult>>> = Lazy::new(|| Mutex::new(HashMap::new())); static COOKIES: LazyLock<Mutex<HashMap<i32, fn() -> StatsPullResult>>> = LazyLock::new(|| Mutex::new(HashMap::new())); /// # Safety /// Loading Loading
libstats/pull_rust/Android.bp +0 −1 Original line number Diff line number Diff line Loading @@ -61,7 +61,6 @@ rust_library { srcs: ["stats_pull.rs"], rustlibs: [ "liblog_rust", "libonce_cell", "libstatslog_rust_header", "libstatspull_bindgen", ], Loading
libstats/pull_rust/stats_pull.rs +3 −4 Original line number Diff line number Diff line Loading @@ -14,13 +14,12 @@ //! A Rust interface for the StatsD pull API. use once_cell::sync::Lazy; use statslog_rust_header::{Atoms, Stat, StatsError}; use statspull_bindgen::*; use std::collections::HashMap; use std::convert::TryInto; use std::os::raw::c_void; use std::sync::Mutex; use std::sync::{LazyLock, Mutex}; /// The return value of callbacks. pub type StatsPullResult = Vec<Box<dyn Stat>>; Loading Loading @@ -107,8 +106,8 @@ impl Default for Metadata { } } static COOKIES: Lazy<Mutex<HashMap<i32, fn() -> StatsPullResult>>> = Lazy::new(|| Mutex::new(HashMap::new())); static COOKIES: LazyLock<Mutex<HashMap<i32, fn() -> StatsPullResult>>> = LazyLock::new(|| Mutex::new(HashMap::new())); /// # Safety /// Loading