Procházet zdrojové kódy

refactor: use normal string instead of byte string

Johann150 před 2 roky
rodič
revize
a890fe315c
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  1. 1 1
      src/main.rs

+ 1 - 1
src/main.rs

@@ -185,7 +185,7 @@ fn main() -> Result<()> {
     };
     for maildir in std::fs::read_dir(maildir)?.filter_map(|m| m.ok()) {
         let dir_name = maildir.file_name().into_string().unwrap(); // TODO no unwrap
-        if dir_name.as_bytes()[0] == b'.' || ["cur", "new", "tmp"].contains(&dir_name.as_str()) {
+        if dir_name.starts_with('.') || ["cur", "new", "tmp"].contains(&dir_name.as_str()) {
             continue;
         }