Skip to content

Commit ce7b045

Browse files
jackpot51phil-opp
authored andcommitted
Update to new Unique API (#6)
1 parent f742a71 commit ce7b045

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/hole.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ impl HoleList {
3838
HoleList {
3939
first: Hole {
4040
size: 0,
41-
next: Some(Unique::new(ptr)),
41+
next: Some(Unique::new_unchecked(ptr)),
4242
},
4343
}
4444
}
@@ -301,7 +301,7 @@ fn deallocate(mut hole: &mut Hole, addr: usize, mut size: usize) {
301301
let ptr = addr as *mut Hole;
302302
mem::replace(unsafe { &mut *ptr }, new_hole);
303303
// add the F block as the next block of the X block
304-
hole.next = Some(unsafe { Unique::new(ptr) });
304+
hole.next = Some(unsafe { Unique::new_unchecked(ptr) });
305305
}
306306
}
307307
break;

0 commit comments

Comments
 (0)