happy clippy

This commit is contained in:
adria0 2020-02-26 19:46:11 +01:00 committed by Adria Massanet
parent b23f044a00
commit 0bcbd34a6c
3 changed files with 3 additions and 3 deletions

View File

@ -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();

View File

@ -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);

View File

@ -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,