about summary refs log tree commit diff
diff options
context:
space:
mode:
authormojave2 <chenchen145@huawei.com>2022-06-30 21:10:28 +0800
committermojave2 <chenchen145@huawei.com>2022-06-30 21:10:28 +0800
commit6c3ca7e41870e06469838acefa4a63709f1f802f (patch)
tree39f385cea763948fc2b106d7aaaa72d517341b91
parent10f4ce324baf7cfb7ce2b2096662b82b79204944 (diff)
downloadrust-6c3ca7e41870e06469838acefa4a63709f1f802f.tar.gz
rust-6c3ca7e41870e06469838acefa4a63709f1f802f.zip
correct the output of a `capacity` method example
-rw-r--r--library/alloc/src/string.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/library/alloc/src/string.rs b/library/alloc/src/string.rs
index 668af60611b..901bdf11e71 100644
--- a/library/alloc/src/string.rs
+++ b/library/alloc/src/string.rs
@@ -317,11 +317,11 @@ use crate::vec::Vec;
 ///
 /// ```text
 /// 0
-/// 5
-/// 10
-/// 20
-/// 20
-/// 40
+/// 8
+/// 16
+/// 16
+/// 32
+/// 32
 /// ```
 ///
 /// At first, we have no memory allocated at all, but as we append to the