1
0
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:
neuronull
2025-09-15 19:52:22 -06:00
parent 72ae6c0fe7
commit aa860b70ba

View File

@@ -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))
}
}