Skip to content

Commit ca56cd8

Browse files
authored
fix: Do not require &mut self for try_send (#63)
That is probably a leftover from when we made Sender Clone.
1 parent 0db3188 commit ca56cd8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -712,7 +712,7 @@ pub mod channel {
712712
/// then the sender will be closed and further sends will return an [`SendError::Io`]
713713
/// with [`std::io::ErrorKind::BrokenPipe`]. Therefore, make sure to always poll the
714714
/// future until completion if you want to reuse the sender or any clone afterwards.
715-
pub async fn try_send(&mut self, value: T) -> std::result::Result<bool, SendError> {
715+
pub async fn try_send(&self, value: T) -> std::result::Result<bool, SendError> {
716716
match self {
717717
Sender::Tokio(tx) => match tx.try_send(value) {
718718
Ok(()) => Ok(true),

0 commit comments

Comments
 (0)