Skip to content

Commit ed93cc1

Browse files
committed
fix tutorial lint warnings
1 parent 042618d commit ed93cc1

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

doc/tutorial-ffi.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,6 @@ use std::cast;
153153
use std::libc::{c_void, size_t, malloc, free};
154154
use std::ptr;
155155
use std::unstable::intrinsics;
156-
use std::util;
157156
158157
// a wrapper around the handle returned by the foreign code
159158
pub struct Unique<T> {
@@ -186,7 +185,7 @@ pub impl<T: Owned> Unique<T> {
186185
impl<T: Owned> Drop for Unique<T> {
187186
fn finalize(&self) {
188187
unsafe {
189-
let mut x = intrinsics::init(); // dummy value to swap in
188+
let x = intrinsics::init(); // dummy value to swap in
190189
// moving the object out is needed to call the destructor
191190
ptr::replace_ptr(self.ptr, x);
192191
free(self.ptr as *c_void)

0 commit comments

Comments
 (0)