Skip to content

Commit

Permalink
remove log dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
seanmonstar committed Jun 14, 2023
1 parent 080dc29 commit 91d123f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
3 changes: 1 addition & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ documentation = "https://docs.rs/want"
edition = "2018"

[dependencies]
log = "0.4"
try-lock = "0.2"
try-lock = "0.2.4"

[dev-dependencies]
tokio-executor = "0.2.0-alpha.2"
Expand Down
8 changes: 0 additions & 8 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,6 @@
//! # fn main() {}
//! ```

#[macro_use]
extern crate log;

use std::fmt;
use std::future::Future;
use std::mem;
Expand Down Expand Up @@ -197,11 +194,9 @@ impl Giver {
let state = self.inner.state.load(SeqCst).into();
match state {
State::Want => {
trace!("poll_want: taker wants!");
return Poll::Ready(Ok(()));
},
State::Closed => {
trace!("poll_want: closed");
return Poll::Ready(Err(Closed { _inner: () }));
},
State::Idle | State::Give => {
Expand Down Expand Up @@ -329,7 +324,6 @@ impl Taker {
/// drop the value yet.
#[inline]
pub fn cancel(&mut self) {
trace!("signal: {:?}", State::Closed);
self.signal(State::Closed)
}

Expand All @@ -340,7 +334,6 @@ impl Taker {
self.inner.state.load(SeqCst) != State::Closed.into(),
"want called after cancel"
);
trace!("signal: {:?}", State::Want);
self.signal(State::Want)
}

Expand All @@ -354,7 +347,6 @@ impl Taker {
if let Some(mut locked) = self.inner.task.try_lock_explicit(SeqCst, SeqCst) {
if let Some(task) = locked.take() {
drop(locked);
trace!("signal found waiting giver, notifying");
task.wake();
}
return;
Expand Down

0 comments on commit 91d123f

Please sign in to comment.