Merge pull request #13 from metajack/rust-up

Upgrade to latest Rust.
This commit is contained in:
Josh Matthews
2013-07-08 09:56:05 -07:00
6 changed files with 9 additions and 3 deletions
+1 -1
View File
@@ -68,7 +68,7 @@ pub struct CFWrapper<T, PlaceholderType1, PlaceholderType2> {
#[unsafe_destructor]
impl<T,E1,E2> Drop for CFWrapper<T,E1,E2> {
fn finalize(&self) {
fn drop(&self) {
unsafe {
// sadly, cannot use obj.as_type_ref() here, because drop
// cannot make virtual method calls using trait
+1 -1
View File
@@ -81,7 +81,7 @@ impl<KeyRefType: Copy + AbstractCFTypeRef, ValueRefType: Copy + AbstractCFTypeRe
pub fn new(pairs: &[(KeyRefType,ValueRefType)]) -> CFDictionary<KeyRefType, ValueRefType> {
let mut keys : ~[CFTypeRef] = ~[];
let mut values : ~[CFTypeRef] = ~[];
for pairs.each |pair| {
for pairs.iter().advance |pair| {
// FIXME: "let" would be much nicer here, but that doesn't work yet.
match *pair {
(ref key, ref value) => {
+2
View File
@@ -7,6 +7,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#[allow(non_uppercase_statics)];
use base::{AbstractCFTypeRef, Boolean, CFAllocatorRef, CFTypeID, CFTypeRef, CFWrapper};
use base::{kCFAllocatorDefault};
+1 -1
View File
@@ -58,7 +58,7 @@ pub struct CFSet<ElemRefType> {
impl<ElemRefType : AbstractCFTypeRef> CFSet<ElemRefType> {
pub fn new(elems: &[ElemRefType]) -> CFSet<ElemRefType> {
let result: CFSetRef;
let elems_refs = do vec::map(elems) |e: &ElemRefType| {
let elems_refs = do elems.map |e: &ElemRefType| {
e.as_type_ref()
};
+2
View File
@@ -7,6 +7,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#[allow(non_uppercase_statics)];
use base::{AbstractCFTypeRef, Boolean, CFAllocatorRef, CFIndex, CFOptionFlags, CFRange};
use base::{CFRangeMake, CFTypeRef, CFTypeID, CFWrapper, kCFAllocatorDefault, kCFAllocatorNull};
+2
View File
@@ -7,6 +7,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#[allow(non_uppercase_statics)];
use base::{AbstractCFTypeRef, CFAllocatorRef, CFOptionFlags, CFTypeID, CFTypeRef, CFWrapper};
use data::{CFDataRef};
use string::{CFString, CFStringRef, CFStringEncoding};