mirror of
https://github.com/bitwarden/browser
synced 2026-02-05 19:23:19 +00:00
convert printlns in autostart crate
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
use anyhow::Result;
|
||||
use ashpd::desktop::background::Background;
|
||||
use tracing::{error, info};
|
||||
|
||||
pub async fn set_autostart(autostart: bool, params: Vec<String>) -> Result<()> {
|
||||
let request = if params.is_empty() {
|
||||
@@ -10,11 +11,15 @@ pub async fn set_autostart(autostart: bool, params: Vec<String>) -> Result<()> {
|
||||
|
||||
match request.send().await.and_then(|r| r.response()) {
|
||||
Ok(response) => {
|
||||
println!("[ASHPD] Autostart enabled: {:?}", response);
|
||||
info!(
|
||||
response = ?response,
|
||||
"[ASHPD] Autostart enabled");
|
||||
Ok(())
|
||||
}
|
||||
Err(err) => {
|
||||
println!("[ASHPD] Error enabling autostart: {}", err);
|
||||
error!(
|
||||
error = %err,
|
||||
"[ASHPD] Error enabling autostart");
|
||||
Err(anyhow::anyhow!("error enabling autostart {}", err))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user