We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d75618e commit 09d528eCopy full SHA for 09d528e
library/alloc/src/collections/vec_deque/mod.rs
@@ -2796,7 +2796,7 @@ impl<T> From<Vec<T>> for VecDeque<T> {
2796
// or doesn't have at least one free space.
2797
// We check if `T` is a ZST in the first condition,
2798
// because `usize::MAX` (the capacity returned by `capacity()` for ZST)
2799
- // is not a power of zero and thus it'll always try
+ // is not a power of two and thus it'll always try
2800
// to reserve more memory which will panic for ZST (rust-lang/rust#78532)
2801
if (!buf.capacity().is_power_of_two() && mem::size_of::<T>() != 0)
2802
|| (buf.capacity() < (MINIMUM_CAPACITY + 1))
0 commit comments