We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents ac09e2f + cc1a211 commit af04420Copy full SHA for af04420
rust-version
@@ -1 +1 @@
1
-84539360498cab3c70a7c9114c0b8106c8e1b06b
+672b272077561ca7b5027a8aff9ea2957c7d4c21
tests/run-pass/heap.rs
@@ -14,12 +14,12 @@ fn allocate_reallocate() {
14
// 6 byte heap alloc (__rust_allocate)
15
s.push_str("foobar");
16
assert_eq!(s.len(), 6);
17
- assert_eq!(s.capacity(), 6);
+ assert_eq!(s.capacity(), 8);
18
19
// heap size doubled to 12 (__rust_reallocate)
20
s.push_str("baz");
21
assert_eq!(s.len(), 9);
22
- assert_eq!(s.capacity(), 12);
+ assert_eq!(s.capacity(), 16);
23
24
// heap size reduced to 9 (__rust_reallocate)
25
s.shrink_to_fit();
0 commit comments