keep up with Rust

This commit is contained in:
Sebastian Gesemann
2015-02-13 23:42:51 +01:00
parent 2959585fdf
commit fdcf4cce1e
3 changed files with 10 additions and 10 deletions

8
Cargo.lock generated
View File

@ -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)",

View File

@ -1,6 +1,6 @@
[package]
name = "secretshare"
version = "0.1.2"
version = "0.1.3"
authors = ["Sebastian Gesemann <s.gesemann@gmail.com>"]
description = "This is an implementation of Shamir's secret sharing scheme."
license = "GPLv3"

View File

@ -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<String> = env::args().map(|oss| oss.into_string().unwrap()).collect();
let args: Vec<String> = 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);
}
}