diff --git a/Cargo.lock b/Cargo.lock index 531d44e..5b0f488 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,20 +2,20 @@ name = "secretshare" version = "0.1.2" dependencies = [ - "crc24 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "getopts 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "crc24 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "getopts 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "crc24" -version = "0.1.1" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "getopts" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "log 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/Cargo.toml b/Cargo.toml index 271e5fa..590fce2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "secretshare" -version = "0.1.2" +version = "0.1.3" authors = ["Sebastian Gesemann "] description = "This is an implementation of Shamir's secret sharing scheme." license = "GPLv3" diff --git a/src/main.rs b/src/main.rs index aa4277d..463f871 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,11 +1,9 @@ #![feature(collections)] #![feature(core)] #![feature(io)] -#![feature(os)] #![feature(env)] #![feature(hash)] -extern crate core; // FIXME: temporary fix for ParseIntError not being available in std extern crate "rustc-serialize" as serialize; extern crate getopts; extern crate crc24; @@ -14,8 +12,9 @@ extern crate rand; use std::iter::repeat; use std::old_io::{ stdio, IoError, IoErrorKind, IoResult, BufferedReader }; use std::env; -use rand::{ Rng, OsRng }; +use std::num; +use rand::{ Rng, OsRng }; use getopts::Options; use serialize::base64::{ self, FromBase64, ToBase64 }; @@ -48,7 +47,7 @@ macro_rules! otry { } /// maps a ParseIntError to an IoError -fn pie2io(p: core::num::ParseIntError) -> IoError { +fn pie2io(p: num::ParseIntError) -> IoError { IoError { detail: Some(p.to_string()), .. other_io_err("Int parsing error") @@ -265,7 +264,7 @@ fn perform_decode() -> IoResult<()> { fn main() { let mut stderr = stdio::stderr(); - let args: Vec = env::args().map(|oss| oss.into_string().unwrap()).collect(); + let args: Vec = env::args().collect(); let mut opts = Options::new(); opts.optflag("h", "help", "print this help text"); @@ -325,3 +324,4 @@ fn main() { env::set_exit_status(1); } } +