File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -184,6 +184,8 @@ pub use alloc_crate::sync::{Arc, Weak};
184184#[ unstable( feature = "mpmc_channel" , issue = "126840" ) ]
185185pub mod mpmc;
186186pub mod mpsc;
187+ #[ unstable( feature = "oneshot_channel" , issue = "143674" ) ]
188+ pub mod oneshot;
187189
188190pub ( crate ) mod once; // `pub(crate)` for the `sys::sync::once` implementations and `LazyLock`.
189191
Original file line number Diff line number Diff line change @@ -654,7 +654,7 @@ impl<T> Clone for Sender<T> {
654654#[ unstable( feature = "mpmc_channel" , issue = "126840" ) ]
655655impl < T > fmt:: Debug for Sender < T > {
656656 fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
657- f. pad ( "Sender { .. }" )
657+ f. debug_struct ( "Sender" ) . finish_non_exhaustive ( )
658658 }
659659}
660660
@@ -1380,7 +1380,7 @@ impl<T> Clone for Receiver<T> {
13801380#[ unstable( feature = "mpmc_channel" , issue = "126840" ) ]
13811381impl < T > fmt:: Debug for Receiver < T > {
13821382 fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
1383- f. pad ( "Receiver { .. }" )
1383+ f. debug_struct ( "Receiver" ) . finish_non_exhaustive ( )
13841384 }
13851385}
13861386
Original file line number Diff line number Diff line change @@ -1114,8 +1114,10 @@ impl<T> error::Error for SendError<T> {}
11141114impl < T > fmt:: Debug for TrySendError < T > {
11151115 fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
11161116 match * self {
1117- TrySendError :: Full ( ..) => "Full(..)" . fmt ( f) ,
1118- TrySendError :: Disconnected ( ..) => "Disconnected(..)" . fmt ( f) ,
1117+ TrySendError :: Full ( ..) => f. debug_tuple ( "TrySendError::Full" ) . finish_non_exhaustive ( ) ,
1118+ TrySendError :: Disconnected ( ..) => {
1119+ f. debug_tuple ( "TrySendError::Disconnected" ) . finish_non_exhaustive ( )
1120+ }
11191121 }
11201122 }
11211123}
You can’t perform that action at this time.
0 commit comments