update breakage response type (#642)

This commit is contained in:
Lucy C
2021-10-11 15:13:23 -06:00
committed by Aiden McClelland
parent 3f30905786
commit 6dcddafcd4
4 changed files with 4 additions and 16 deletions

View File

@@ -230,10 +230,7 @@ pub async fn set_dry(
.configured()
.put(&mut tx, &true)
.await?;
Ok(BreakageRes {
patch: tx.abort().await?,
breakages,
})
Ok(BreakageRes(breakages))
}
pub async fn set_impl(

View File

@@ -111,10 +111,7 @@ pub async fn stop_dry(
let mut breakages = BTreeMap::new();
stop_common(&mut tx, &id, &mut breakages).await?;
Ok(BreakageRes {
breakages,
patch: tx.abort().await?,
})
Ok(BreakageRes(breakages))
}
pub async fn stop_impl(ctx: RpcContext, id: PackageId) -> Result<WithRevision<()>, Error> {

View File

@@ -323,10 +323,7 @@ pub struct TaggedDependencyError {
#[derive(Clone, Debug, Serialize, Deserialize)]
#[serde(rename_all = "kebab-case")]
pub struct BreakageRes {
pub patch: DiffPatch,
pub breakages: BTreeMap<PackageId, TaggedDependencyError>,
}
pub struct BreakageRes(pub BTreeMap<PackageId, TaggedDependencyError>);
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct Dependencies(pub BTreeMap<PackageId, DepInfo>);

View File

@@ -142,10 +142,7 @@ pub async fn uninstall_dry(
break_all_dependents_transitive(&mut tx, &id, DependencyError::NotInstalled, &mut breakages)
.await?;
Ok(BreakageRes {
breakages,
patch: tx.abort().await?,
})
Ok(BreakageRes(breakages))
}
pub async fn uninstall_impl(ctx: RpcContext, id: PackageId) -> Result<WithRevision<()>, Error> {