From e46cce3cb6d0bc092fe7bb4db0e11732b153735f Mon Sep 17 00:00:00 2001 From: Natsu Kagami Date: Mon, 14 Sep 2020 22:57:19 -0400 Subject: [PATCH] prelude: remove ratelimit logs --- youmubot-prelude/src/lib.rs | 2 +- youmubot-prelude/src/ratelimit.rs | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/youmubot-prelude/src/lib.rs b/youmubot-prelude/src/lib.rs index c3f6712..4d7a8ac 100644 --- a/youmubot-prelude/src/lib.rs +++ b/youmubot-prelude/src/lib.rs @@ -7,8 +7,8 @@ pub mod announcer; pub mod args; pub mod hook; pub mod pagination; -pub mod setup; pub mod ratelimit; +pub mod setup; pub use announcer::{Announcer, AnnouncerHandler}; pub use args::{Duration, UsernameArg}; diff --git a/youmubot-prelude/src/ratelimit.rs b/youmubot-prelude/src/ratelimit.rs index d117198..f9ad47b 100644 --- a/youmubot-prelude/src/ratelimit.rs +++ b/youmubot-prelude/src/ratelimit.rs @@ -40,7 +40,6 @@ impl Ratelimit { /// The clock counts from the moment the ref is dropped. pub async fn borrow<'a>(&'a self) -> Result + 'a> { self.recv.recv_async().await?; - eprintln!("lock accquired! {} left", self.recv.len()); Ok(RatelimitGuard { inner: &self.inner, send: &self.send, @@ -62,9 +61,7 @@ impl<'a, T> Drop for RatelimitGuard<'a, T> { let wait_time = self.wait_time.clone(); tokio::spawn(async move { tokio::time::delay_for(wait_time).await; - eprintln!("lock lifting!"); send.send_async(()).await.ok(); - eprintln!("lock lifted!"); }); } }