diff options
| author | Tim Diekmann <tim.diekmann@3dvision.de> | 2020-07-28 12:41:18 +0200 |
|---|---|---|
| committer | Tim Diekmann <tim.diekmann@3dvision.de> | 2020-07-28 12:41:18 +0200 |
| commit | 076ef66ba2f647a627806f376c23b332fb04d3ff (patch) | |
| tree | e0b01276965228cd9fb1cb2577ed5beb1b9e1910 /library/alloc/src/raw_vec | |
| parent | 1f5d69daccd1f04e42886d9aaf513f2691132d17 (diff) | |
Remove in-place allocation and revert to separate methods for zeroed allocations
Fix docs
Diffstat (limited to 'library/alloc/src/raw_vec')
| -rw-r--r-- | library/alloc/src/raw_vec/tests.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/library/alloc/src/raw_vec/tests.rs b/library/alloc/src/raw_vec/tests.rs index 5408faa079c..08a5cbee5a7 100644 --- a/library/alloc/src/raw_vec/tests.rs +++ b/library/alloc/src/raw_vec/tests.rs @@ -20,12 +20,12 @@ fn allocator_param() { fuel: usize, } unsafe impl AllocRef for BoundedAlloc { - fn alloc(&mut self, layout: Layout, init: AllocInit) -> Result<MemoryBlock, AllocErr> { + fn alloc(&mut self, layout: Layout) -> Result<MemoryBlock, AllocErr> { let size = layout.size(); if size > self.fuel { return Err(AllocErr); } - match Global.alloc(layout, init) { + match Global.alloc(layout) { ok @ Ok(_) => { self.fuel -= size; ok |
