about summary refs log tree commit diff
path: root/src/liballoc/raw_vec.rs
diff options
context:
space:
mode:
authorTim Diekmann <tim.diekmann@3dvision.de>2020-03-28 20:21:26 +0100
committerTim Diekmann <tim.diekmann@3dvision.de>2020-03-28 20:22:07 +0100
commitbf6a46db3129b0bf31dc67f06af2e52ece52701a (patch)
tree202ce2e37985e512df1e0b005a79010aa0a66a58 /src/liballoc/raw_vec.rs
parentdb15fe6b383741ae1cc13cfb62fc1c18f8ff5241 (diff)
downloadrust-bf6a46db3129b0bf31dc67f06af2e52ece52701a.tar.gz
rust-bf6a46db3129b0bf31dc67f06af2e52ece52701a.zip
Make fields in `MemoryBlock` public
Diffstat (limited to 'src/liballoc/raw_vec.rs')
-rw-r--r--src/liballoc/raw_vec.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/liballoc/raw_vec.rs b/src/liballoc/raw_vec.rs
index a1f9a9291af..590e82357fb 100644
--- a/src/liballoc/raw_vec.rs
+++ b/src/liballoc/raw_vec.rs
@@ -152,8 +152,8 @@ impl<T, A: AllocRef> RawVec<T, A> {
 
             let memory = alloc.alloc(layout, init).unwrap_or_else(|_| handle_alloc_error(layout));
             Self {
-                ptr: memory.ptr().cast().into(),
-                cap: Self::capacity_from_bytes(memory.size()),
+                ptr: memory.ptr.cast().into(),
+                cap: Self::capacity_from_bytes(memory.size),
                 alloc,
             }
         }
@@ -470,8 +470,8 @@ impl<T, A: AllocRef> RawVec<T, A> {
     }
 
     fn set_memory(&mut self, memory: MemoryBlock) {
-        self.ptr = memory.ptr().cast().into();
-        self.cap = Self::capacity_from_bytes(memory.size());
+        self.ptr = memory.ptr.cast().into();
+        self.cap = Self::capacity_from_bytes(memory.size);
     }
 
     /// Single method to handle all possibilities of growing the buffer.