decode: fallback to relaying current clipboard to stdout on failure

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I6a6a696451def3e367afa9e8b0dd6ae626906e53
This commit is contained in:
raf 2025-08-13 17:19:13 +03:00
commit 64c923480e
Signed by: NotAShelf
GPG key ID: 29D95B64378DB4BF
3 changed files with 56 additions and 9 deletions

View file

@ -148,15 +148,15 @@ fn main() {
// Implement JSON output
match db.list_json() {
Ok(json) => {
println!("{}", json);
println!("{json}");
}
Err(e) => {
log::error!("Failed to list entries as JSON: {}", e);
log::error!("Failed to list entries as JSON: {e}");
}
}
}
_ => {
log::error!("Unsupported format: {}", format);
log::error!("Unsupported format: {format}");
}
}
}