in src/storage.rs [709:734]
fn imports_lock_outdated(&self) -> bool {
// If we have live imports, we're going to be updating imports.lock, so
// it's OK if it's out-of-date with regard to the config.
if self.live_imports.is_some() {
return false;
}
// We must have the exact same set of imports, otherwise an import has
// been added or removed and we're out of date.
if self.config.imports.keys().ne(self.imports.audits.keys()) {
return true;
}
for (import_name, config) in &self.config.imports {
let audits_file = self.imports.audits.get(import_name).unwrap();
// If we have any excluded crates in the imports.lock, it is out of
// date and needs to be regenerated.
for crate_name in &config.exclude {
if audits_file.audits.contains_key(crate_name) {
return true;
}
}
}
false
}