diff --git a/mod_path/build.rs b/mod_path/build.rs index c24949d..ad1d40e 100644 --- a/mod_path/build.rs +++ b/mod_path/build.rs @@ -1,5 +1,3 @@ -#![feature(convert)] - use std::env; use std::fs::File; use std::io::Write; diff --git a/triable/Cargo.toml b/triable/Cargo.toml index 863778f..8ae4072 100644 --- a/triable/Cargo.toml +++ b/triable/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "triable" -version = "0.1.1" +version = "0.1.2" authors = ["Simon Sapin "] license = "MIT" repository = "https://github.com/SimonSapin/rust-std-candidates" diff --git a/triable/lib.rs b/triable/lib.rs index cd14a2c..e968d2f 100644 --- a/triable/lib.rs +++ b/triable/lib.rs @@ -1,4 +1,4 @@ -use std::error::FromError; +use std::convert::From; #[macro_export] @@ -24,11 +24,11 @@ pub trait Triable { impl Triable> for Result -where Err2: FromError { +where Err2: From { fn try(self) -> TriableResult> { match self { Ok(value) => TriableResult::Expression(value), - Err(error) => TriableResult::EarlyReturn(Err(FromError::from_error(error))) + Err(error) => TriableResult::EarlyReturn(Err(From::from(error))) } } } diff --git a/zip_longest/Cargo.toml b/zip_longest/Cargo.toml index 43031c6..8354c04 100644 --- a/zip_longest/Cargo.toml +++ b/zip_longest/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "zip-longest" -version = "0.1.6" +version = "0.1.7" authors = ["Simon Sapin "] license = "MIT" repository = "https://github.com/SimonSapin/rust-std-candidates" diff --git a/zip_longest/lib.rs b/zip_longest/lib.rs index 51f220d..3791ef8 100644 --- a/zip_longest/lib.rs +++ b/zip_longest/lib.rs @@ -1,4 +1,5 @@ #![feature(core)] +#![cfg_attr(test, feature(step_by))] use std::cmp; use std::iter::RandomAccessIterator; @@ -126,9 +127,8 @@ pub enum EitherOrBoth { #[test] fn test_iterator_size_hint() { use std::usize; - use std::iter::count; - let c = count(0i32, 1); + let c = (0i32..).step_by(1); let v: &[_] = &[0i32, 1, 2, 3, 4, 5, 6, 7, 8, 9]; let v2 = &[10i32, 11, 12]; let vi = v.iter();