fix config.set

This commit is contained in:
Aiden McClelland
2021-09-09 19:01:19 -06:00
committed by Aiden McClelland
parent 0cf1a45da7
commit f848697e99
4 changed files with 21 additions and 37 deletions

View File

@@ -260,10 +260,14 @@ impl DependencyConfig {
}
}
pub async fn update_current_dependents<Db: DbHandle>(
pub async fn update_current_dependents<
'a,
Db: DbHandle,
I: IntoIterator<Item = (&'a PackageId, &'a CurrentDependencyInfo)>,
>(
db: &mut Db,
dependent_id: &PackageId,
current_dependencies: &IndexMap<PackageId, CurrentDependencyInfo>,
current_dependencies: I,
) -> Result<(), Error> {
for (dependency, dep_info) in current_dependencies {
if let Some(dependency_model) = crate::db::DatabaseModel::new()