Convert to a pathbuf directly

This commit is contained in:
Paul van Tilburg 2018-08-24 21:21:35 +02:00
parent 83ec82ec54
commit 93196f4dd8
1 changed files with 3 additions and 4 deletions

View File

@ -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());