Fix minor syntax error in example.
This commit is contained in:
parent
d3f497861d
commit
8222970f79
1 changed files with 1 additions and 1 deletions
|
|
@ -135,7 +135,7 @@ impl<T> Rc<T> {
|
|||
fn new(data: T) -> Self {
|
||||
unsafe {
|
||||
// Wouldn't it be nice if heap::allocate worked like this?
|
||||
let ptr = heap::allocate<RcBox<T>>();
|
||||
let ptr = heap::allocate::<RcBox<T>>();
|
||||
ptr::write(ptr, RcBox {
|
||||
data: data,
|
||||
ref_count: 1,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue