about summary refs log tree commit diff
path: root/src/libcollections/string.rs
diff options
context:
space:
mode:
authorClark Gaebel <cgaebel@mozilla.com>2014-10-24 19:31:17 -0700
committerClark Gaebel <cgaebel@mozilla.com>2014-10-24 20:12:53 -0700
commit87a5f0ddf477d1c86ac6e016feefd7ae9c574226 (patch)
treee88eca7cc4bbd69e9bc1e1808fc2a974742c91ba /src/libcollections/string.rs
parenta10917a6a9b087d10ac4fd0186b719218627281e (diff)
downloadrust-87a5f0ddf477d1c86ac6e016feefd7ae9c574226.tar.gz
rust-87a5f0ddf477d1c86ac6e016feefd7ae9c574226.zip
Make the Vec data structure layout match raw::Slice.
Fixes #18302

r? @thestinger
Diffstat (limited to 'src/libcollections/string.rs')
-rw-r--r--src/libcollections/string.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libcollections/string.rs b/src/libcollections/string.rs
index fa45dee7cde..c44a03b05cd 100644
--- a/src/libcollections/string.rs
+++ b/src/libcollections/string.rs
@@ -780,7 +780,7 @@ pub mod raw {
     #[inline]
     pub unsafe fn from_parts(buf: *mut u8, length: uint, capacity: uint) -> String {
         String {
-            vec: Vec::from_raw_parts(length, capacity, buf),
+            vec: Vec::from_raw_parts(buf, length, capacity),
         }
     }