about summary refs log tree commit diff
path: root/library/alloc/src/string.rs
diff options
context:
space:
mode:
authorYuki Okushi <jtitor@2k36.org>2022-07-26 07:14:45 +0900
committerGitHub <noreply@github.com>2022-07-26 07:14:45 +0900
commitb8aab9781a76f4498cc3819674397dedad37f20b (patch)
tree6f737391ba18b3d28fbc5da40685e24e5079a178 /library/alloc/src/string.rs
parent29892759f6a712b341b35fa66ae485dbe348616f (diff)
parent6c3ca7e41870e06469838acefa4a63709f1f802f (diff)
downloadrust-b8aab9781a76f4498cc3819674397dedad37f20b.tar.gz
rust-b8aab9781a76f4498cc3819674397dedad37f20b.zip
Rollup merge of #98710 - mojave2:string, r=JohnTitor
correct the output of a `capacity` method example

The output of this example in std::alloc is different from which shown in the comment. I have tested it on both Linux and Windows.
Diffstat (limited to 'library/alloc/src/string.rs')
-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 b1513e5e0f3..a5118e5333b 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