diff --git a/src/lib.rs b/src/lib.rs index 515de0e37..6557ef34d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -164,10 +164,7 @@ pub struct StreamSelfEncryptor { impl StreamSelfEncryptor { /// For encryption, return with an intialized streaming encryptor. /// If a `chunk_dir` is provided, the encrypted_chunks will be written into the specified dir as well. - pub fn encrypt_from_file( - file_path: PathBuf, - chunk_dir: Option, - ) -> Result { + pub fn encrypt_from_file(file_path: PathBuf, chunk_dir: Option) -> Result { let file = File::open(&*file_path)?; let metadata = file.metadata()?; let file_size = metadata.len(); diff --git a/src/tests.rs b/src/tests.rs index 1aff37f8a..cf2419a0d 100644 --- a/src/tests.rs +++ b/src/tests.rs @@ -34,10 +34,8 @@ fn test_stream_self_encryptor() -> Result<(), Error> { create_dir_all(chunk_path.clone())?; // Encrypt the file using StreamSelfEncryptor - let mut encryptor = StreamSelfEncryptor::encrypt_from_file( - file_path, - Some(chunk_path.clone()), - )?; + let mut encryptor = + StreamSelfEncryptor::encrypt_from_file(file_path, Some(chunk_path.clone()))?; let mut encrypted_chunks = Vec::new(); let mut data_map = None; while let Ok((chunk, map)) = encryptor.next_encryption() {