Skip to content

Commit

Permalink
Rollup merge of rust-lang#98710 - mojave2:string, r=JohnTitor
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Dylan-DPC authored Jul 25, 2022
2 parents 6e28b0e + 6c3ca7e commit c0893e9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions library/alloc/src/string.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c0893e9

Please sign in to comment.