Merge pull request #52 from toofar/feat/faster_update_setup_again

Use set for paths-to-update comparison
This commit is contained in:
Polochon-street 2022-10-16 22:59:35 +02:00 committed by GitHub
commit 8391095198
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -129,7 +129,7 @@ use rusqlite::Params;
use rusqlite::Row;
use serde::de::DeserializeOwned;
use serde::Serialize;
use std::collections::HashMap;
use std::collections::{HashMap, HashSet};
use std::env;
use std::fs;
use std::fs::create_dir_all;
@ -661,7 +661,7 @@ impl<Config: AppConfigTrait> Library<Config> {
Ok(row.get_unwrap::<usize, String>(0))
})?
.map(|x| PathBuf::from(x.unwrap()))
.collect::<Vec<PathBuf>>();
.collect::<HashSet<PathBuf>>();
return_value
};