about summary refs log tree commit diff
path: root/doc/tutorial-ffi.md
diff options
context:
space:
mode:
Diffstat (limited to 'doc/tutorial-ffi.md')
-rw-r--r--doc/tutorial-ffi.md6
1 files changed, 3 insertions, 3 deletions
diff --git a/doc/tutorial-ffi.md b/doc/tutorial-ffi.md
index d3c682ce1ad..047b57e56a6 100644
--- a/doc/tutorial-ffi.md
+++ b/doc/tutorial-ffi.md
@@ -159,7 +159,7 @@ pub struct Unique<T> {
     priv ptr: *mut T
 }
 
-impl<T: Owned> Unique<T> {
+impl<T: Send> Unique<T> {
     pub fn new(value: T) -> Unique<T> {
         unsafe {
             let ptr = malloc(std::sys::size_of::<T>() as size_t) as *mut T;
@@ -182,8 +182,8 @@ impl<T: Owned> Unique<T> {
 }
 
 #[unsafe_destructor]
-impl<T: Owned> Drop for Unique<T> {
-    fn finalize(&self) {
+impl<T: Send> Drop for Unique<T> {
+    fn drop(&self) {
         unsafe {
             let x = intrinsics::init(); // dummy value to swap in
             // moving the object out is needed to call the destructor