Skip to content

Commit 09d528e

Browse files
committed
fix typo
1 parent d75618e commit 09d528e

File tree

1 file changed

+1
-1
lines changed
  • library/alloc/src/collections/vec_deque

1 file changed

+1
-1
lines changed

library/alloc/src/collections/vec_deque/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2796,7 +2796,7 @@ impl<T> From<Vec<T>> for VecDeque<T> {
27962796
// or doesn't have at least one free space.
27972797
// We check if `T` is a ZST in the first condition,
27982798
// because `usize::MAX` (the capacity returned by `capacity()` for ZST)
2799-
// is not a power of zero and thus it'll always try
2799+
// is not a power of two and thus it'll always try
28002800
// to reserve more memory which will panic for ZST (rust-lang/rust#78532)
28012801
if (!buf.capacity().is_power_of_two() && mem::size_of::<T>() != 0)
28022802
|| (buf.capacity() < (MINIMUM_CAPACITY + 1))

0 commit comments

Comments
 (0)