From 382db0f3b47f130cc01164a5ed86748bcc115279 Mon Sep 17 00:00:00 2001 From: Yuki Kishimoto Date: Mon, 28 Oct 2024 08:47:34 +0100 Subject: [PATCH] pool: rename `InternalRelayPool` to `InnerRelayPool` Signed-off-by: Yuki Kishimoto --- .../nostr-relay-pool/src/pool/{internal.rs => inner.rs} | 6 +++--- crates/nostr-relay-pool/src/pool/mod.rs | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) rename crates/nostr-relay-pool/src/pool/{internal.rs => inner.rs} (99%) diff --git a/crates/nostr-relay-pool/src/pool/internal.rs b/crates/nostr-relay-pool/src/pool/inner.rs similarity index 99% rename from crates/nostr-relay-pool/src/pool/internal.rs rename to crates/nostr-relay-pool/src/pool/inner.rs index 88e8881ba..97f2505a8 100644 --- a/crates/nostr-relay-pool/src/pool/internal.rs +++ b/crates/nostr-relay-pool/src/pool/inner.rs @@ -25,7 +25,7 @@ use crate::{RelayServiceFlags, SubscribeOptions}; type Relays = HashMap; #[derive(Debug, Clone)] -pub struct InternalRelayPool { +pub struct InnerRelayPool { database: Arc, relays: Arc>, notification_sender: broadcast::Sender, @@ -34,7 +34,7 @@ pub struct InternalRelayPool { //opts: RelayPoolOptions, } -impl AtomicDestroyer for InternalRelayPool { +impl AtomicDestroyer for InnerRelayPool { fn name(&self) -> Option { Some(String::from("Relay Pool")) } @@ -49,7 +49,7 @@ impl AtomicDestroyer for InternalRelayPool { } } -impl InternalRelayPool { +impl InnerRelayPool { pub fn with_database(opts: RelayPoolOptions, database: D) -> Self where D: IntoNostrDatabase, diff --git a/crates/nostr-relay-pool/src/pool/mod.rs b/crates/nostr-relay-pool/src/pool/mod.rs index 52b5f0073..f30b8112f 100644 --- a/crates/nostr-relay-pool/src/pool/mod.rs +++ b/crates/nostr-relay-pool/src/pool/mod.rs @@ -16,12 +16,12 @@ use tokio::sync::broadcast; pub use tokio_stream::wrappers::ReceiverStream; mod error; -mod internal; +mod inner; pub mod options; mod output; pub use self::error::Error; -use self::internal::InternalRelayPool; +use self::inner::InnerRelayPool; pub use self::options::RelayPoolOptions; pub use self::output::Output; use crate::relay::flags::FlagCheck; @@ -69,7 +69,7 @@ pub enum RelayPoolNotification { /// Relay Pool #[derive(Debug, Clone)] pub struct RelayPool { - inner: AtomicDestructor, + inner: AtomicDestructor, } impl Default for RelayPool { @@ -101,7 +101,7 @@ impl RelayPool { D: IntoNostrDatabase, { Self { - inner: AtomicDestructor::new(InternalRelayPool::with_database(opts, database)), + inner: AtomicDestructor::new(InnerRelayPool::with_database(opts, database)), } }