File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
branches/try/src/libsyntax Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change 2
2
refs/heads/master: 9c68679f2ebd5b165694e9346e4ad96a3e32aceb
3
3
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4
4
refs/heads/snap-stage3: 6faa4f33a42de32579e02a8d030db920d360e2b5
5
- refs/heads/try: d1bd139251be4b1c51ace8d180757ca7b59e675a
5
+ refs/heads/try: 2fdad65a057d9b6cd159623ebeba131ec32f69dd
6
6
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
7
7
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8
8
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
Original file line number Diff line number Diff line change @@ -58,9 +58,12 @@ impl<T> OwnedSlice<T> {
58
58
if len == 0 {
59
59
OwnedSlice :: empty ( )
60
60
} else {
61
+ // drop excess capacity to avoid breaking sized deallocation
62
+ v. shrink_to_fit ( ) ;
63
+
61
64
let p = v. as_mut_ptr ( ) ;
62
65
// we own the allocation now
63
- unsafe { mem:: forget ( v) }
66
+ unsafe { mem:: forget ( v) }
64
67
65
68
OwnedSlice { data : p, len : len }
66
69
}
You can’t perform that action at this time.
0 commit comments