Change some output generating lines

This commit is contained in:
Elias Schriefer 2020-08-30 16:32:09 +02:00
parent a58d540126
commit 06a7aea979

View File

@ -16,6 +16,8 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
}
env_logger::init();
debug!("PID: {}, User: {}", std::process::id(), std::env::var("USER").unwrap_or("N/A".into()));
// New Crossroads instance
let mut cr = Crossroads::new();
@ -37,10 +39,10 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
// Aquire name on D-Bus
match c.request_name(DBUS_NAME, false, true, false).await {
Ok(_) => debug!("D-Bus name: {}", DBUS_NAME),
Ok(_) => info!("Listening (D-Bus) on {}", DBUS_NAME),
Err(err) => {
error!("Couldn't request name on D-Bus: {}", err);
return Err(err.into());
std::process::exit(1);
}
};
@ -51,7 +53,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
true
}));
// Will (afaik) be stabilized in Rust 1.46
// Will (afaik) be stabilized in Rust 1.48
// core::future::pending::<()>().await;
loop {};
unreachable!();