File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -464,19 +464,16 @@ pub mod channel {
464464 /// all.
465465 ///
466466 /// Returns true if the message was sent.
467- pub async fn try_send ( & mut self , value : T ) -> std:: result:: Result < ( ) , SendError > {
467+ pub async fn try_send ( & mut self , value : T ) -> std:: result:: Result < bool , SendError > {
468468 match self {
469469 Sender :: Tokio ( tx) => match tx. try_send ( value) {
470- Ok ( ( ) ) => Ok ( ( ) ) ,
470+ Ok ( ( ) ) => Ok ( true ) ,
471471 Err ( tokio:: sync:: mpsc:: error:: TrySendError :: Closed ( _) ) => {
472472 Err ( SendError :: ReceiverClosed )
473473 }
474- Err ( tokio:: sync:: mpsc:: error:: TrySendError :: Full ( _) ) => Ok ( ( ) ) ,
474+ Err ( tokio:: sync:: mpsc:: error:: TrySendError :: Full ( _) ) => Ok ( false ) ,
475475 } ,
476- Sender :: Boxed ( sink) => {
477- sink. try_send ( value) . await . map_err ( SendError :: from) ?;
478- Ok ( ( ) )
479- }
476+ Sender :: Boxed ( sink) => sink. try_send ( value) . await . map_err ( SendError :: from) ,
480477 }
481478 }
482479 }
You can’t perform that action at this time.
0 commit comments