Skip to content

Commit

Permalink
fix bounded sender len and is_empty examples
Browse files Browse the repository at this point in the history
  • Loading branch information
tqwewe committed Jan 15, 2025
1 parent 79ab386 commit 1689ba1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tokio/src/sync/mpsc/bounded.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1069,7 +1069,7 @@ impl<T> Sender<T> {
///
/// #[tokio::main]
/// async fn main() {
/// let (tx, rx) = mpsc::unbounded_channel();
/// let (tx, rx) = mpsc::channel(10);
/// assert!(rx.is_empty());
///
/// tx.send(0).await.unwrap();
Expand All @@ -1088,7 +1088,7 @@ impl<T> Sender<T> {
///
/// #[tokio::main]
/// async fn main() {
/// let (tx, rx) = mpsc::unbounded_channel();
/// let (tx, rx) = mpsc::channel(10);
/// assert_eq!(0, rx.len());
///
/// tx.send(0).await.unwrap();
Expand Down

0 comments on commit 1689ba1

Please sign in to comment.