sync: reword allocation failure paragraph in broadcast docs (#7595)

This commit is contained in:
Martin Grigorov
2025-09-09 09:05:14 +00:00
committed by GitHub
parent 044eaa1a41
commit 8efd04e382
+1 -1
View File
@@ -503,7 +503,7 @@ const MAX_RECEIVERS: usize = usize::MAX >> 2;
/// This will panic if `capacity` is equal to `0`.
///
/// 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]
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.