From be4e26b2c76bf7706f4da479cf06bf46094f0563 Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Thu, 20 Sep 2012 10:02:03 -0700 Subject: [PATCH] Update for standard library changes --- boolean.rs | 2 +- dictionary.rs | 4 ++-- number.rs | 2 +- string.rs | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/boolean.rs b/boolean.rs index 1497ed1..2f2fabd 100644 --- a/boolean.rs +++ b/boolean.rs @@ -1,5 +1,5 @@ use base::{AbstractCFType, CFRelease, CFRetain, CFTypeRef}; -use unsafe::reinterpret_cast; +use cast::reinterpret_cast; struct __CFBoolean { private: () } pub type CFBooleanRef = *__CFBoolean; diff --git a/dictionary.rs b/dictionary.rs index f8796a8..f00f501 100644 --- a/dictionary.rs +++ b/dictionary.rs @@ -1,8 +1,8 @@ use base::{AbstractCFType, CFAllocatorRef, CFIndex, CFRelease, CFTypeRef, kCFAllocatorDefault}; +use cast::reinterpret_cast; use dvec::DVec; use libc::c_void; use ptr::to_unsafe_ptr; -use unsafe::reinterpret_cast; use vec::raw::to_ptr; pub type CFDictionaryRetainCallBack = *u8; @@ -50,7 +50,7 @@ mod CFDictionary { let (keys, values) = (DVec(), DVec()); for pairs.each |pair| { // FIXME: "let" would be much nicer here, but that doesn't work yet. - match pair { + match *pair { (ref key, ref value) => { keys.push(key.as_type_ref()); values.push(value.as_type_ref()); diff --git a/number.rs b/number.rs index 14498b3..4ec2baf 100644 --- a/number.rs +++ b/number.rs @@ -1,6 +1,6 @@ use base::{AbstractCFType, CFAllocatorRef, CFIndex, CFRelease, CFTypeRef, kCFAllocatorDefault}; +use cast::reinterpret_cast; use libc::{c_int, c_void}; -use unsafe::reinterpret_cast; struct __CFNumber { private: () } pub type CFNumberRef = *__CFNumber; diff --git a/string.rs b/string.rs index f42ac76..2d09493 100644 --- a/string.rs +++ b/string.rs @@ -1,7 +1,7 @@ use base::{AbstractCFType, Boolean, CFAllocatorRef, CFIndex, CFRelease, CFTypeRef}; use base::{kCFAllocatorDefault, kCFAllocatorNull}; +use cast::reinterpret_cast; use libc::c_char; -use unsafe::reinterpret_cast; type CFStringEncoding = u32;