mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-26 00:00:16 +02:00
sync: reword allocation failure paragraph in broadcast docs (#7595)
This commit is contained in:
@@ -503,7 +503,7 @@ const MAX_RECEIVERS: usize = usize::MAX >> 2;
|
|||||||
/// This will panic if `capacity` is equal to `0`.
|
/// This will panic if `capacity` is equal to `0`.
|
||||||
///
|
///
|
||||||
/// This pre-allocates space for `capacity` messages. Allocation failure may result in a panic or
|
/// This pre-allocates space for `capacity` messages. Allocation failure may result in a panic or
|
||||||
/// [an allocation failure](std::alloc::handle_alloc_error).
|
/// [an allocation error](std::alloc::handle_alloc_error).
|
||||||
#[track_caller]
|
#[track_caller]
|
||||||
pub fn channel<T: Clone>(capacity: usize) -> (Sender<T>, Receiver<T>) {
|
pub fn channel<T: Clone>(capacity: usize) -> (Sender<T>, Receiver<T>) {
|
||||||
// SAFETY: In the line below we are creating one extra receiver, so there will be 1 in total.
|
// SAFETY: In the line below we are creating one extra receiver, so there will be 1 in total.
|
||||||
|
|||||||
Reference in New Issue
Block a user