Skip to content

Commit

Permalink
Add Clone conformance to WeakSender
Browse files Browse the repository at this point in the history
  • Loading branch information
bwoods committed Nov 18, 2023
1 parent 8b73677 commit 18b0963
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed

- `WeakSender` is now `Clone`

### Fixed

# [0.11.0] - 2023-08-16
Expand Down
7 changes: 7 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -858,6 +858,13 @@ impl<T> WeakSender<T> {
}
}

impl<T> Clone for WeakSender<T> {
/// Clones this [`WeakSender`].
fn clone(&self) -> Self {
Self { shared: self.shared.clone() }
}
}

/// The receiving end of a channel.
///
/// Note: Cloning the receiver *does not* turn this channel into a broadcast channel.
Expand Down

0 comments on commit 18b0963

Please sign in to comment.