From 44e91e290e35ddc7547581b8f8eef5ea480866e2 Mon Sep 17 00:00:00 2001 From: Joonas Koivunen Date: Wed, 1 Apr 2020 14:43:44 +0300 Subject: [PATCH] chore: forgotten cargo fmt --- src/repo/mod.rs | 4 +--- src/subscription.rs | 18 +++++++++++++----- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/src/repo/mod.rs b/src/repo/mod.rs index 014d615d..af1e181d 100644 --- a/src/repo/mod.rs +++ b/src/repo/mod.rs @@ -110,9 +110,7 @@ impl Repo { /// Shutdowns the repo, cancelling any pending subscriptions; Likely going away after some /// refactoring, see notes on [`Ipfs::exit_daemon`]. pub async fn shutdown(&self) { - self.subscriptions.lock() - .await - .shutdown(); + self.subscriptions.lock().await.shutdown(); } pub async fn init(&self) -> Result<(), Error> { diff --git a/src/subscription.rs b/src/subscription.rs index 18149fbc..66ac218e 100644 --- a/src/subscription.rs +++ b/src/subscription.rs @@ -20,7 +20,8 @@ impl fmt::Debug for SubscriptionRegistry(), std::any::type_name::(), std::any::type_name::(), - self.subscriptions) + self.subscriptions + ) } } @@ -72,7 +73,8 @@ impl SubscriptionRegistry { log::trace!( "Cancelled {} subscriptions and {} are pending (not immediatedly locked)", cancelled, - pending.len()); + pending.len() + ); let remaining = pending.len(); @@ -85,7 +87,8 @@ impl SubscriptionRegistry { log::debug!( "Remaining {} pending subscriptions cancelled (total of {})", remaining, - cancelled + remaining); + cancelled + remaining + ); } } @@ -125,9 +128,14 @@ impl fmt::Debug for Subscription { fmt, "Subscription<{}>(result: {}, wakers: {}, cancelled: {})", std::any::type_name::(), - if self.result.is_some() { "Some(_)" } else { "None" }, + if self.result.is_some() { + "Some(_)" + } else { + "None" + }, self.wakers.len(), - self.cancelled) + self.cancelled + ) } }