sync: clarify panic behavior of broadcast::channel() (#8420)

Co-authored-by: philphauler <[email protected]>
This commit is contained in:
Phil Phauler
2026-09-06 20:20:39 +08:00
committed by GitHub
co-authored by philphauler
parent 0069aef281
commit 7d0d729d8f
+1 -1
View File
@@ -532,7 +532,7 @@ const MAX_RECEIVERS: usize = usize::MAX >> 2;
///
/// # Panics
///
/// This will panic if `capacity` is equal to `0`.
/// This will panic if `capacity` is equal to `0` or exceeds `usize::MAX / 2`.
///
/// This pre-allocates space for `capacity` messages. Allocation failure may result in a panic or
/// [an allocation error](std::alloc::handle_alloc_error).