Browse Source

refactor: use normal string instead of byte string

Johann150 2 years ago
parent
commit
a890fe315c
1 changed files with 1 additions and 1 deletions
  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;
         }