From 0bcbd34a6ca114eab13125d43165f47f39dcaec4 Mon Sep 17 00:00:00 2001 From: adria0 Date: Wed, 26 Feb 2020 19:46:11 +0100 Subject: [PATCH] happy clippy --- src/feed/message.rs | 2 +- src/feed/privatebox.rs | 2 +- src/keystore/identity.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/feed/message.rs b/src/feed/message.rs index b908061..6c86a6e 100644 --- a/src/feed/message.rs +++ b/src/feed/message.rs @@ -206,7 +206,7 @@ mod test { #[test] fn test_sign_verify() -> Result<()> { let content = Value::String("thistest".to_string()); - let id = OwnedIdentity::new(); + let id = OwnedIdentity::create(); let msg1 = Message::sign(None, &id, content.clone())?.to_string(); let msg1 = Message::from_str(&msg1)?; let msg2 = Message::sign(Some(&msg1), &id, content)?.to_string(); diff --git a/src/feed/privatebox.rs b/src/feed/privatebox.rs index ea38d50..fd3f545 100644 --- a/src/feed/privatebox.rs +++ b/src/feed/privatebox.rs @@ -139,7 +139,7 @@ mod test { #[test] fn test_msg_cipher_to_one_helper() -> Result<()> { - let id = OwnedIdentity::new(); + let id = OwnedIdentity::create(); let plaintext = "holar"; let ciphertext = privatebox_cipher(plaintext, &[&id.id])?; assert_eq!(is_privatebox(&ciphertext), true); diff --git a/src/keystore/identity.rs b/src/keystore/identity.rs index 8be7520..c9816d3 100644 --- a/src/keystore/identity.rs +++ b/src/keystore/identity.rs @@ -9,7 +9,7 @@ pub struct OwnedIdentity { } impl OwnedIdentity { - pub fn new() -> OwnedIdentity { + pub fn create() -> OwnedIdentity { let (pk, sk) = ed25519::gen_keypair(); OwnedIdentity { pk,