Skip to content

Commit

Permalink
Merge pull request #1 from lbeder/fix-travis-yml
Browse files Browse the repository at this point in the history
Fix .travis.yml
  • Loading branch information
lbeder authored Feb 22, 2019
2 parents d306d4a + 39ea32b commit 4c759fd
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ rust:
- stable
- nightly
cache: cargo
before_script:
- rustup component add clippy
before_script:
- rustup component add clippy
script:
- cargo clippy --all-targets --all-features -- -D warnings
- cargo test --release
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ Scrypt Key Derivation Function in Rust
## Usage

```bash
Usage: scrypt-kdf v0.3.3 [options]
Usage: scrypt-kdf [options]
Version: v0.3.4

Options:
-i, --iterations ITER
Expand Down
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ use crate::scrypt_kdf::{ScryptKDF, ScryptKDFOptions};
const VERSION: &str = env!("CARGO_PKG_VERSION");

fn print_usage(program: &str, opts: &Options) {
let brief = format!("Usage: {} v{} [options]", program, VERSION);
let brief = format!("Usage: {} [options]\nVersion: {}", program, VERSION);
println!("{}", opts.usage(&brief));
}

Expand Down
4 changes: 2 additions & 2 deletions src/scrypt_kdf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ pub struct ScryptKDF<'a> {
}

impl<'a> ScryptKDF<'a> {
pub fn new(opts: &ScryptKDFOptions) -> ScryptKDF {
pub fn new(opts: &'a ScryptKDFOptions) -> Self {
ScryptKDF { opts }
}

Expand All @@ -71,7 +71,7 @@ impl<'a> ScryptKDF<'a> {

pub fn derive_test_vectors() -> Vec<Vec<u8>> {
let mut results: Vec<Vec<u8>> = vec![];
for test_vector in ScryptKDF::test_vectors() {
for test_vector in Self::test_vectors() {
let kdf = Self::new(&test_vector.opts);
results.push(kdf.derive_key("", &test_vector.secret));
}
Expand Down

0 comments on commit 4c759fd

Please sign in to comment.