From e90175c6385e982a307fab8e8aa95a641fb15517 Mon Sep 17 00:00:00 2001 From: Bryan Stitt Date: Wed, 5 Apr 2023 14:37:59 -0700 Subject: [PATCH] remove unused atomics --- web3_proxy/src/atomics.rs | 22 ---------------------- web3_proxy/src/lib.rs | 1 - 2 files changed, 23 deletions(-) delete mode 100644 web3_proxy/src/atomics.rs diff --git a/web3_proxy/src/atomics.rs b/web3_proxy/src/atomics.rs deleted file mode 100644 index 8b0e8e5e..00000000 --- a/web3_proxy/src/atomics.rs +++ /dev/null @@ -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) - } -} diff --git a/web3_proxy/src/lib.rs b/web3_proxy/src/lib.rs index 229d5cb0..c57695b9 100644 --- a/web3_proxy/src/lib.rs +++ b/web3_proxy/src/lib.rs @@ -1,6 +1,5 @@ pub mod admin_queries; pub mod app; -pub mod atomics; pub mod block_number; pub mod config; pub mod frontend;