Fixing typos & adopting std::process::exit.

* Minor changes (typos, keep up with rust stable) while skimming through the code
* Minor changes: s/secretshare/rustysecrets in usage string
This commit is contained in:
Ismail Khoffi
2016-04-09 20:35:53 +02:00
committed by Frederic Jacobs
parent 3767677b9d
commit 0966bbbc3d
2 changed files with 5 additions and 5 deletions

View File

@ -1,5 +1,5 @@
//! This module provides the Gf256 type which is used to represent
//! elements of a finite field wich 256 elements.
//! elements of a finite field with 256 elements.
use std::ops::{ Add, Sub, Mul, Div };

View File

@ -7,6 +7,7 @@ mod lib;
use std::io;
use std::env;
use std::process;
enum Action {
Encode(u8, u8), // k and n parameter
@ -39,14 +40,13 @@ fn main() {
Ok(m) => m,
Err(f) => {
drop(writeln!(&mut stderr, "Error: {}", f));
// env::set_exit_status(1); // FIXME: unstable feature
return;
process::exit(1);
}
};
if args.len() < 2 || opt_matches.opt_present("h") {
println!(
"The program secretshare is an implementation of Shamir's secret sharing scheme.\n\
"The program rustysecrets is an implementation of Shamir's secret sharing scheme.\n\
It is applied byte-wise within a finite field for arbitrarily long secrets.\n");
println!("{}", opts.usage("Usage: rustysecrets [options]"));
println!("Input is read from STDIN and output is written to STDOUT.");
@ -84,7 +84,7 @@ fn main() {
if let Err(e) = result {
drop(writeln!(&mut stderr, "{}", e));
// env::set_exit_status(1); // FIXME: unstable feature
process::exit(1);
}
}