Run cargo fmt

This commit is contained in:
Vicki Pfau 2024-04-01 19:26:49 -07:00
parent 9431ae9474
commit 36c34fcbda
2 changed files with 12 additions and 7 deletions

View file

@ -131,8 +131,10 @@ impl SteamOSManager {
SystemdUnit::new(self.connection.clone(), "jupiter_2dfan_2dcontrol_2eservice") SystemdUnit::new(self.connection.clone(), "jupiter_2dfan_2dcontrol_2eservice")
.await .await
.map_err(anyhow_to_zbus_fdo)?; .map_err(anyhow_to_zbus_fdo)?;
let active = jupiter_fan_control.active().await let active = jupiter_fan_control
.map_err(anyhow_to_zbus_fdo)?; .active()
.await
.map_err(anyhow_to_zbus_fdo)?;
Ok(match active { Ok(match active {
true => FanControl::OS as u32, true => FanControl::OS as u32,
false => FanControl::BIOS as u32, false => FanControl::BIOS as u32,
@ -412,7 +414,8 @@ mod test {
.await .await
.unwrap(); .unwrap();
let manager = SteamOSManager::new(connection.clone()).await.unwrap(); let manager = SteamOSManager::new(connection.clone()).await.unwrap();
connection.object_server() connection
.object_server()
.at("/com/steampowered/SteamOSManager1", manager) .at("/com/steampowered/SteamOSManager1", manager)
.await .await
.expect("object_server at"); .expect("object_server at");

View file

@ -143,13 +143,15 @@ pub async fn setup_iwd_config(want_override: bool) -> std::io::Result<()> {
async fn restart_iwd(connection: Connection) -> Result<()> { async fn restart_iwd(connection: Connection) -> Result<()> {
// First reload systemd since we modified the config most likely // First reload systemd since we modified the config most likely
// otherwise we wouldn't be restarting iwd. // otherwise we wouldn't be restarting iwd.
daemon_reload(&connection).await.inspect_err(|message| daemon_reload(&connection)
error!("restart_iwd: reload systemd got an error: {message}"))?; .await
.inspect_err(|message| error!("restart_iwd: reload systemd got an error: {message}"))?;
// worked, now restart iwd // worked, now restart iwd
let unit = SystemdUnit::new(connection, "iwd_2eservice").await?; let unit = SystemdUnit::new(connection, "iwd_2eservice").await?;
unit.restart().await.inspect_err(|message| unit.restart()
error!("restart_iwd: restart unit got an error: {message}")) .await
.inspect_err(|message| error!("restart_iwd: restart unit got an error: {message}"))
} }
async fn stop_tracing() -> Result<()> { async fn stop_tracing() -> Result<()> {