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.
This commit is contained in:
Yuki Okushi 2022-07-26 07:14:45 +09:00 committed by GitHub
commit b8aab9781a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -317,11 +317,11 @@
///
/// ```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