Skip to content

Commit b8aab97

Browse files
authored
Rollup merge of rust-lang#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.
2 parents 2989275 + 6c3ca7e commit b8aab97

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

library/alloc/src/string.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -317,11 +317,11 @@ use crate::vec::Vec;
317317
///
318318
/// ```text
319319
/// 0
320-
/// 5
321-
/// 10
322-
/// 20
323-
/// 20
324-
/// 40
320+
/// 8
321+
/// 16
322+
/// 16
323+
/// 32
324+
/// 32
325325
/// ```
326326
///
327327
/// At first, we have no memory allocated at all, but as we append to the

0 commit comments

Comments
 (0)