cargo fmt

This commit is contained in:
Victoria Brekenfeld 2022-05-03 13:37:51 +02:00
parent f7ff84d2a0
commit 8ccb93d8eb
15 changed files with 460 additions and 239 deletions

View file

@ -1,8 +1,8 @@
// SPDX-License-Identifier: GPL-3.0-only
use crate::state::State;
use libsystemd::daemon::{booted, notify, NotifyState};
use std::process::Command;
use crate::state::State;
pub fn ready(state: &State) {
if booted() {
@ -11,13 +11,19 @@ pub fn ready(state: &State) {
.env("WAYLAND_DISPLAY", &state.common.socket)
.status()
{
Ok(x) if x.success() => {},
Ok(x) => slog_scope::warn!("Failed to import WAYLAND_DISPLAY into systemd (exit code {:?})", x.code()),
Err(err) => slog_scope::error!("Failed to run systemctl although booted with systemd: {}", err),
Ok(x) if x.success() => {}
Ok(x) => slog_scope::warn!(
"Failed to import WAYLAND_DISPLAY into systemd (exit code {:?})",
x.code()
),
Err(err) => slog_scope::error!(
"Failed to run systemctl although booted with systemd: {}",
err
),
};
if let Err(err) = notify(false, &[NotifyState::Ready]) {
slog_scope::error!("Failed to notify systemd: {}", err);
}
}
}
}