mirror of
https://github.com/mii443/RustySecrets.git
synced 2025-08-22 16:25:32 +00:00
keep up with Rust
This commit is contained in:
8
Cargo.lock
generated
8
Cargo.lock
generated
@ -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)",
|
||||
|
@ -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"
|
||||
|
10
src/main.rs
10
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<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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user