remove unused atomics
This commit is contained in:
parent
09dacb45e2
commit
e90175c638
@ -1,22 +0,0 @@
|
|||||||
use std::sync::atomic::{AtomicU64, Ordering};
|
|
||||||
|
|
||||||
pub struct AtomicF64 {
|
|
||||||
storage: AtomicU64,
|
|
||||||
}
|
|
||||||
|
|
||||||
impl AtomicF64 {
|
|
||||||
pub fn new(value: f64) -> Self {
|
|
||||||
let as_u64 = value.to_bits();
|
|
||||||
Self {
|
|
||||||
storage: AtomicU64::new(as_u64),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
pub fn store(&self, value: f64, ordering: Ordering) {
|
|
||||||
let as_u64 = value.to_bits();
|
|
||||||
self.storage.store(as_u64, ordering)
|
|
||||||
}
|
|
||||||
pub fn load(&self, ordering: Ordering) -> f64 {
|
|
||||||
let as_u64 = self.storage.load(ordering);
|
|
||||||
f64::from_bits(as_u64)
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,6 +1,5 @@
|
|||||||
pub mod admin_queries;
|
pub mod admin_queries;
|
||||||
pub mod app;
|
pub mod app;
|
||||||
pub mod atomics;
|
|
||||||
pub mod block_number;
|
pub mod block_number;
|
||||||
pub mod config;
|
pub mod config;
|
||||||
pub mod frontend;
|
pub mod frontend;
|
||||||
|
Loading…
Reference in New Issue
Block a user