Skip to content

Commit

Permalink
Bump atomic-destructor to 0.3
Browse files Browse the repository at this point in the history
Signed-off-by: Yuki Kishimoto <[email protected]>
  • Loading branch information
yukibtc committed Nov 29, 2024
1 parent 4306715 commit 7f8cd41
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 16 deletions.
7 changes: 2 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ rust-version = "1.70.0"
async-trait = "0.1"
async-utility = "0.3"
async-wsocket = "0.11"
atomic-destructor = { version = "0.2", default-features = false }
atomic-destructor = { version = "0.3", default-features = false }
js-sys = "0.3"
negentropy = { version = "0.4", default-features = false }
negentropy-deprecated = { package = "negentropy", version = "0.3", default-features = false }
Expand Down
2 changes: 1 addition & 1 deletion crates/nostr-relay-builder/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ tor = ["async-wsocket/tor"]
[dependencies]
async-utility.workspace = true
async-wsocket.workspace = true
atomic-destructor = { workspace = true, features = ["tracing"] }
atomic-destructor.workspace = true
nostr = { workspace = true, default-features = false, features = ["std"] }
nostr-database.workspace = true
thiserror.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion crates/nostr-relay-pool/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ nip11 = ["nostr/nip11"]
[dependencies]
async-utility.workspace = true
async-wsocket = { workspace = true, features = ["socks"] }
atomic-destructor = { workspace = true, features = ["tracing"] }
atomic-destructor.workspace = true
negentropy = { workspace = true, features = ["std"] }
negentropy-deprecated = { workspace = true, features = ["std"] }
nostr = { workspace = true, features = ["std"] }
Expand Down
4 changes: 0 additions & 4 deletions crates/nostr-relay-pool/src/pool/inner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,6 @@ pub struct InnerRelayPool {
}

impl AtomicDestroyer for InnerRelayPool {
fn name(&self) -> Option<String> {
Some(String::from("Relay Pool"))
}

fn on_destroy(&self) {
let pool = self.clone();
task::spawn(async move {
Expand Down
4 changes: 0 additions & 4 deletions crates/nostr-relay-pool/src/relay/inner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,6 @@ pub(crate) struct InnerRelay {
}

impl AtomicDestroyer for InnerRelay {
fn name(&self) -> Option<String> {
Some(format!("Relay {}", self.url))
}

fn on_destroy(&self) {
if let Err(e) = self.disconnect() {
tracing::error!("Impossible to shutdown '{}': {e}", self.url);
Expand Down

0 comments on commit 7f8cd41

Please sign in to comment.