From 39ea32b1baa84979fdc7ba5af012ffd1b71fc6c0 Mon Sep 17 00:00:00 2001 From: Leonid Beder Date: Fri, 22 Feb 2019 19:42:13 +0200 Subject: [PATCH] Refactor --- src/scrypt_kdf.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/scrypt_kdf.rs b/src/scrypt_kdf.rs index 01c739d..52b7b28 100644 --- a/src/scrypt_kdf.rs +++ b/src/scrypt_kdf.rs @@ -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 } } @@ -71,7 +71,7 @@ impl<'a> ScryptKDF<'a> { pub fn derive_test_vectors() -> Vec> { let mut results: Vec> = 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)); }