process: Make API less fiddly

This commit is contained in:
Vicki Pfau 2024-03-28 18:12:21 -07:00
parent fd14514d6c
commit 8ae6c98554
5 changed files with 76 additions and 107 deletions

View file

@ -123,6 +123,14 @@ async fn reload() -> Result<()> {
}
}
pub fn anyhow_to_zbus(error: Error) -> zbus::Error {
zbus::Error::Failure(error.to_string())
}
pub fn anyhow_to_zbus_fdo(error: Error) -> zbus::fdo::Error {
zbus::fdo::Error::Failed(error.to_string())
}
async fn create_connection() -> Result<Connection> {
let manager = manager::SteamOSManager::new().await?;