Parcourir la source

removed commented code

Yurii Sokolovskyi il y a 3 mois
Parent
commit
99fd583884
2 fichiers modifiés avec 0 ajouts et 15 suppressions
  1. 0 6
      src/main.rs
  2. 0 9
      src/server.rs

+ 0 - 6
src/main.rs

@@ -178,12 +178,6 @@ fn persist_email(msg: &Message, uid: u32, list: String, original_path: PathBuf)
     };
     message.set_path(relative_path.display().to_string());
     if Config::global().include_html {
-        // let html = append_ext("html", &message_dir.join(message.hash.clone()));
-        // let mut file = File::create(html)?;
-        // let data = message_to_html(message.clone());
-        // file.write_all(data.as_bytes())?;
-        // file.flush()?;
-
         let data = message_to_html(message.clone());
         match compress_and_save_file(message_dir.clone(), message.hash.clone(), data.as_bytes()){
             Ok(_) => {}

+ 0 - 9
src/server.rs

@@ -53,15 +53,6 @@ pub async fn get_email(id: String) -> String {
         .join(message.list.clone())
         .join("messages")
         .join(message.hash.clone() + ".tar.gz");
-    // let mut file = match File::open(abs_path.clone()) {
-    //     Ok(content) => {content}
-    //     Err(_) => {return "".to_string()}
-    // };
-    // let mut content = String::new();
-    // match file.read_to_string(&mut content) {
-    //     Ok(_) => {}
-    //     Err(_) => {return String::new()}
-    // };
     let mut content = match read_and_decompress_file(abs_path, message.hash.clone()) {
         Ok(content) => {
             String::from_utf8_lossy(&content).to_string()