From 2e8d362b333f0b9d8e5e1b33f7777335a8a3c1e4 Mon Sep 17 00:00:00 2001 From: Aleksey Kuznetsov Date: Sun, 1 Feb 2015 14:08:44 +0500 Subject: [PATCH] Fixed warnings. --- src/array.rs | 2 +- src/dictionary.rs | 1 - src/lib.rs | 2 ++ 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/array.rs b/src/array.rs index d80f4fd..3f7cfb7 100644 --- a/src/array.rs +++ b/src/array.rs @@ -14,7 +14,6 @@ use base::{CFType, CFTypeID, CFTypeRef, TCFType}; use base::{kCFAllocatorDefault}; use libc::c_void; use std::mem; -use std::num::ToPrimitive; /// FIXME(pcwalton): This is wrong. pub type CFArrayRetainCallBack = *const u8; @@ -179,6 +178,7 @@ extern { #[test] fn should_box_and_unbox() { use number::{CFNumber, number}; + use std::num::ToPrimitive; let arr = CFArray::from_CFTypes(&[ number(1).as_CFType(), diff --git a/src/dictionary.rs b/src/dictionary.rs index 00db38a..d0fff98 100644 --- a/src/dictionary.rs +++ b/src/dictionary.rs @@ -15,7 +15,6 @@ use base::{CFType, CFTypeID, CFTypeRef, TCFType, kCFAllocatorDefault}; use libc::c_void; use std::mem; use std::ptr; -use std::vec; pub type CFDictionaryApplierFunction = *const u8; pub type CFDictionaryCopyDescriptionCallBack = *const u8; diff --git a/src/lib.rs b/src/lib.rs index 6337eda..0f0c117 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -12,6 +12,8 @@ #![allow(non_snake_case)] +#![feature(core, libc, collections)] + extern crate libc; #[cfg(target_os="macos")]