Skip to content

Commit e9866f6

Browse files
committed
style: cargo fmt
1 parent 82dc789 commit e9866f6

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

src/lib.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -164,10 +164,7 @@ pub struct StreamSelfEncryptor {
164164
impl StreamSelfEncryptor {
165165
/// For encryption, return with an intialized streaming encryptor.
166166
/// If a `chunk_dir` is provided, the encrypted_chunks will be written into the specified dir as well.
167-
pub fn encrypt_from_file(
168-
file_path: PathBuf,
169-
chunk_dir: Option<PathBuf>,
170-
) -> Result<Self> {
167+
pub fn encrypt_from_file(file_path: PathBuf, chunk_dir: Option<PathBuf>) -> Result<Self> {
171168
let file = File::open(&*file_path)?;
172169
let metadata = file.metadata()?;
173170
let file_size = metadata.len();

src/tests.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,8 @@ fn test_stream_self_encryptor() -> Result<(), Error> {
3434
create_dir_all(chunk_path.clone())?;
3535

3636
// Encrypt the file using StreamSelfEncryptor
37-
let mut encryptor = StreamSelfEncryptor::encrypt_from_file(
38-
file_path,
39-
Some(chunk_path.clone()),
40-
)?;
37+
let mut encryptor =
38+
StreamSelfEncryptor::encrypt_from_file(file_path, Some(chunk_path.clone()))?;
4139
let mut encrypted_chunks = Vec::new();
4240
let mut data_map = None;
4341
while let Ok((chunk, map)) = encryptor.next_encryption() {

0 commit comments

Comments
 (0)