Loading libstats/pull_rust/Android.bp +1 −1 Original line number Diff line number Diff line Loading @@ -60,8 +60,8 @@ rust_library { crate_name: "statspull_rust", srcs: ["stats_pull.rs"], rustlibs: [ "liblazy_static", "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,7 +14,7 @@ //! A Rust interface for the StatsD pull API. use lazy_static::lazy_static; use once_cell::sync::Lazy; use statslog_rust_header::{Atoms, Stat, StatsError}; use statspull_bindgen::*; use std::collections::HashMap; Loading Loading @@ -107,9 +107,8 @@ impl Default for Metadata { } } lazy_static! { static ref COOKIES: Mutex<HashMap<i32, fn() -> StatsPullResult>> = Mutex::new(HashMap::new()); } static COOKIES: Lazy<Mutex<HashMap<i32, fn() -> StatsPullResult>>> = Lazy::new(|| Mutex::new(HashMap::new())); /// # Safety /// Loading Loading
libstats/pull_rust/Android.bp +1 −1 Original line number Diff line number Diff line Loading @@ -60,8 +60,8 @@ rust_library { crate_name: "statspull_rust", srcs: ["stats_pull.rs"], rustlibs: [ "liblazy_static", "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,7 +14,7 @@ //! A Rust interface for the StatsD pull API. use lazy_static::lazy_static; use once_cell::sync::Lazy; use statslog_rust_header::{Atoms, Stat, StatsError}; use statspull_bindgen::*; use std::collections::HashMap; Loading Loading @@ -107,9 +107,8 @@ impl Default for Metadata { } } lazy_static! { static ref COOKIES: Mutex<HashMap<i32, fn() -> StatsPullResult>> = Mutex::new(HashMap::new()); } static COOKIES: Lazy<Mutex<HashMap<i32, fn() -> StatsPullResult>>> = Lazy::new(|| Mutex::new(HashMap::new())); /// # Safety /// Loading