happy clippy
This commit is contained in:
parent
b23f044a00
commit
0bcbd34a6c
@ -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();
|
||||
|
@ -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);
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user