fix tutorial lint warnings

This commit is contained in:
Daniel Micay 2013-05-31 13:00:31 -04:00
parent 042618da7b
commit ed93cc1987

View file

@ -153,7 +153,6 @@ use std::cast;
use std::libc::{c_void, size_t, malloc, free};
use std::ptr;
use std::unstable::intrinsics;
use std::util;
// a wrapper around the handle returned by the foreign code
pub struct Unique<T> {
@ -186,7 +185,7 @@ pub impl<T: Owned> Unique<T> {
impl<T: Owned> Drop for Unique<T> {
fn finalize(&self) {
unsafe {
let mut x = intrinsics::init(); // dummy value to swap in
let x = intrinsics::init(); // dummy value to swap in
// moving the object out is needed to call the destructor
ptr::replace_ptr(self.ptr, x);
free(self.ptr as *c_void)