replaced cell::update with cell::[g|s]et
This commit is contained in:
parent
7e443a1ffc
commit
219003bd2e
|
@ -1,10 +1,6 @@
|
|||
#![feature(cell_update)]
|
||||
|
||||
use super::*;
|
||||
use std::cell::Cell;
|
||||
|
||||
|
||||
|
||||
#[test]
|
||||
fn allocator_param() {
|
||||
use crate::alloc::AllocErr;
|
||||
|
@ -32,7 +28,7 @@ fn allocator_param() {
|
|||
}
|
||||
match Global.alloc(layout) {
|
||||
ok @ Ok(_) => {
|
||||
self.fuel.update(|old| old - size);
|
||||
self.fuel.set(self.fuel.get() - size);
|
||||
ok
|
||||
}
|
||||
err @ Err(_) => err,
|
||||
|
|
Loading…
Reference in New Issue