We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 857acb2 commit 44d2df1Copy full SHA for 44d2df1
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