Convert to a pathbuf directly

master
Paul van Tilburg 4 years ago
parent 83ec82ec54
commit 93196f4dd8
  1. 7
      src/registry.rs

@ -32,13 +32,12 @@ impl Registry {
};
for entry in dir_walker.into_iter().filter_entry(dir_filter) {
self.albums_fs.insert(PathBuf::from(
self.albums_fs.insert(
entry?
.path()
.strip_prefix(self.base_path.clone())?
.to_str()
.unwrap(),
));
.to_path_buf(),
);
counter.tick(1);
}
counter.set(self.albums_fs.len());