From 8e12affa595cc5e1e580e376fae9bc03d4fe0acb Mon Sep 17 00:00:00 2001 From: Chris Morgan Date: Wed, 4 Feb 2015 14:45:19 +1100 Subject: [PATCH] 0.9.10: Rust update --- Cargo.toml | 2 +- src/lib.rs | 19 ++++++++++--------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index b514e92..6b34ed7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "anymap" -version = "0.9.9" +version = "0.9.10" authors = ["Chris Morgan "] description = "A safe and convenient store for one value of each type" #documentation = "http://www.rust-ci.org/chris-morgan/anymap/doc/anymap/index.html" diff --git a/src/lib.rs b/src/lib.rs index 3b9d913..c4c2161 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,9 +1,10 @@ //! This crate provides the `AnyMap` type, a safe and convenient store for one value of each type. +#![feature(core, std_misc, hash)] +#![cfg_attr(test, feature(test))] #![warn(unused_qualifications, non_upper_case_globals, variant_size_differences, unused_typecasts, missing_docs, unused_results)] -#![allow(unstable)] #[cfg(test)] extern crate test; @@ -121,7 +122,7 @@ impl UncheckedBoxAny for Box { /// data.remove::(); /// assert_eq!(data.get::(), None); /// -/// #[derive(PartialEq, Show)] +/// #[derive(PartialEq, Debug)] /// struct Foo { /// str: String, /// } @@ -492,13 +493,13 @@ fn bench_get_present(b: &mut ::test::Bencher) { #[test] fn test_entry() { - #[derive(Show, PartialEq)] struct A(i32); - #[derive(Show, PartialEq)] struct B(i32); - #[derive(Show, PartialEq)] struct C(i32); - #[derive(Show, PartialEq)] struct D(i32); - #[derive(Show, PartialEq)] struct E(i32); - #[derive(Show, PartialEq)] struct F(i32); - #[derive(Show, PartialEq)] struct J(i32); + #[derive(Debug, PartialEq)] struct A(i32); + #[derive(Debug, PartialEq)] struct B(i32); + #[derive(Debug, PartialEq)] struct C(i32); + #[derive(Debug, PartialEq)] struct D(i32); + #[derive(Debug, PartialEq)] struct E(i32); + #[derive(Debug, PartialEq)] struct F(i32); + #[derive(Debug, PartialEq)] struct J(i32); let mut map: AnyMap = AnyMap::new(); assert_eq!(map.insert(A(10)), None); -- 2.42.0