diff options
| author | bors <bors@rust-lang.org> | 2013-05-31 15:22:45 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2013-05-31 15:22:45 -0700 |
| commit | 55c23bc55706d71e2168c0eef42f59f20e06b75f (patch) | |
| tree | 599bc6bbed9522ad81f9498c396333af407e5d72 /src/libextra | |
| parent | 91a707390045eb29e5392de1f7f5b9d5fdb64e65 (diff) | |
| parent | ed93cc1987842d05992376c25a02d21d049ef792 (diff) | |
auto merge of #6862 : thestinger/rust/swap, r=bstrie
I don't like the `util` module in general, and `ptr` is a much better place for these.
Diffstat (limited to 'src/libextra')
| -rw-r--r-- | src/libextra/rc.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/libextra/rc.rs b/src/libextra/rc.rs index 381b8ac05ba..8cd1c893bb6 100644 --- a/src/libextra/rc.rs +++ b/src/libextra/rc.rs @@ -28,7 +28,6 @@ use core::libc::{c_void, size_t, malloc, free}; use core::ptr; use core::sys; use core::unstable::intrinsics; -use core::util; struct RcBox<T> { value: T, @@ -73,7 +72,7 @@ impl<T> Drop for Rc<T> { unsafe { (*self.ptr).count -= 1; if (*self.ptr).count == 0 { - util::replace_ptr(self.ptr, intrinsics::uninit()); + ptr::replace_ptr(self.ptr, intrinsics::uninit()); free(self.ptr as *c_void) } } @@ -223,7 +222,7 @@ impl<T> Drop for RcMut<T> { unsafe { (*self.ptr).count -= 1; if (*self.ptr).count == 0 { - util::replace_ptr(self.ptr, uninit()); + ptr::replace_ptr(self.ptr, uninit()); free(self.ptr as *c_void) } } |
