1
0
mirror of https://github.com/bspeice/qadapt synced 2025-07-01 05:46:16 -04:00

Final cleanup, time to commit

This commit is contained in:
2018-11-11 22:34:05 -05:00
parent 8bc768e40b
commit 901e7941a2
5 changed files with 30 additions and 17 deletions

View File

@ -1,7 +1,7 @@
extern crate qadapt;
use qadapt::QADAPT;
use qadapt::allocate_panic;
use qadapt::QADAPT;
#[global_allocator]
static Q: QADAPT = QADAPT;
@ -9,7 +9,8 @@ static Q: QADAPT = QADAPT;
#[allocate_panic]
fn allocates() {
assert_eq!(::qadapt::protection_level(), 1);
let mut v = Vec::new();
// Without boxing, release profile can actually optimize out the allocation
let mut v = Box::new(Vec::new());
v.push(1);
}