diff --git a/aes/src/lib.rs b/aes/src/lib.rs index ed562871..c9f1f605 100644 --- a/aes/src/lib.rs +++ b/aes/src/lib.rs @@ -65,7 +65,7 @@ //! // Initialize cipher //! let cipher = Aes128::new(&key); //! -//! let block_copy = block.clone(); +//! let block_copy = block; //! //! // Encrypt block in-place //! cipher.encrypt_block(&mut block); diff --git a/aria/src/lib.rs b/aria/src/lib.rs index 14a8f683..88d5ce98 100644 --- a/aria/src/lib.rs +++ b/aria/src/lib.rs @@ -18,7 +18,7 @@ //! // Initialize cipher //! let cipher = Aria128::new(&key); //! -//! let block_copy = block.clone(); +//! let block_copy = block; //! // Encrypt block in-place //! cipher.encrypt_block(&mut block); //! // And decrypt it back diff --git a/cast5/src/lib.rs b/cast5/src/lib.rs index 26dede16..16044019 100644 --- a/cast5/src/lib.rs +++ b/cast5/src/lib.rs @@ -18,7 +18,7 @@ //! // Initialize cipher //! let cipher = Cast5::new(&key); //! -//! let block_copy = block.clone(); +//! let block_copy = block; //! // Encrypt block in-place //! cipher.encrypt_block(&mut block); //! // And decrypt it back diff --git a/cast6/src/lib.rs b/cast6/src/lib.rs index 4c462c72..696743d1 100644 --- a/cast6/src/lib.rs +++ b/cast6/src/lib.rs @@ -18,7 +18,7 @@ //! // Initialize cipher //! let cipher = Cast6::new(&key); //! -//! let block_copy = block.clone(); +//! let block_copy = block; //! // Encrypt block in-place //! cipher.encrypt_block(&mut block); //! // And decrypt it back diff --git a/speck/tests/mod.rs b/speck/tests/mod.rs index bda26f68..905e0c1c 100644 --- a/speck/tests/mod.rs +++ b/speck/tests/mod.rs @@ -22,7 +22,7 @@ macro_rules! new_test { let ciphertext = hex!($ct_hex); let cipher = $cipher::new(&key.into()); - let mut block = plaintext.clone().into(); + let mut block = plaintext.into(); cipher.encrypt_block(&mut block); assert_eq!(&ciphertext, block.as_slice()); diff --git a/twofish/tests/mod.rs b/twofish/tests/mod.rs index eadd1cd0..aa324c58 100644 --- a/twofish/tests/mod.rs +++ b/twofish/tests/mod.rs @@ -17,9 +17,9 @@ macro_rules! new_test { for i in 1..50 { let twofish = Twofish::new_from_slice(&key).unwrap(); - let mut buf = plain.clone(); + let mut buf = plain; twofish.encrypt_block(&mut buf); - cipher = buf.clone(); + cipher = buf; twofish.decrypt_block(&mut buf); assert_eq!(plain, buf);