Skip to content

Commit 4b7aec5

Browse files
committed
update api
1 parent e5bebe8 commit 4b7aec5

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

Diff for: Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ homepage = "https://github.com/al8n/wg"
66
repository = "https://github.com/al8n/wg.git"
77
documentation = "https://docs.rs/wg/"
88
readme = "README.md"
9-
version = "0.7.3"
9+
version = "0.7.4"
1010
license = "MIT OR Apache-2.0"
1111
keywords = ["waitgroup", "async", "sync", "notify", "wake"]
1212
categories = ["asynchronous", "concurrency", "data-structures"]

Diff for: src/future.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ impl AsyncWaitGroup {
162162
/// });
163163
/// # })
164164
/// ```
165-
pub fn done(self) {
165+
pub fn done(&self) {
166166
if self.inner.counter.fetch_sub(1, Ordering::SeqCst) == 1 {
167167
self.inner.event.notify(usize::MAX);
168168
}

Diff for: src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ impl WaitGroup {
220220
/// });
221221
///
222222
/// ```
223-
pub fn done(self) {
223+
pub fn done(&self) {
224224
let mut val = self.inner.count.lock_me();
225225

226226
*val = if val.eq(&1) {

Diff for: src/tokio.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ impl AsyncWaitGroup {
161161
/// });
162162
/// }
163163
/// ```
164-
pub fn done(self) {
164+
pub fn done(&self) {
165165
if self.inner.counter.fetch_sub(1, Ordering::SeqCst) == 1 {
166166
self.inner.notify.notify_waiters();
167167
}

0 commit comments

Comments
 (0)