From 6648fac82c62279e3bbbb279ed0d531c653e0333 Mon Sep 17 00:00:00 2001 From: Jack Moffitt Date: Mon, 8 Jul 2013 10:50:46 -0600 Subject: [PATCH] Upgrade to latest Rust. --- base.rs | 2 +- dictionary.rs | 2 +- number.rs | 2 ++ set.rs | 2 +- string.rs | 2 ++ url.rs | 2 ++ 6 files changed, 9 insertions(+), 3 deletions(-) diff --git a/base.rs b/base.rs index a18211a..b2b7d59 100644 --- a/base.rs +++ b/base.rs @@ -68,7 +68,7 @@ pub struct CFWrapper { #[unsafe_destructor] impl Drop for CFWrapper { - fn finalize(&self) { + fn drop(&self) { unsafe { // sadly, cannot use obj.as_type_ref() here, because drop // cannot make virtual method calls using trait diff --git a/dictionary.rs b/dictionary.rs index 1be8ff2..29e5da5 100644 --- a/dictionary.rs +++ b/dictionary.rs @@ -81,7 +81,7 @@ impl CFDictionary { 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) => { diff --git a/number.rs b/number.rs index 44a6101..7dc6c22 100644 --- a/number.rs +++ b/number.rs @@ -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}; diff --git a/set.rs b/set.rs index 3057a34..2e00f80 100644 --- a/set.rs +++ b/set.rs @@ -58,7 +58,7 @@ pub struct CFSet { impl CFSet { pub fn new(elems: &[ElemRefType]) -> CFSet { let result: CFSetRef; - let elems_refs = do vec::map(elems) |e: &ElemRefType| { + let elems_refs = do elems.map |e: &ElemRefType| { e.as_type_ref() }; diff --git a/string.rs b/string.rs index a1aeaa7..11d991f 100644 --- a/string.rs +++ b/string.rs @@ -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}; diff --git a/url.rs b/url.rs index 47cd450..f03f943 100644 --- a/url.rs +++ b/url.rs @@ -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};