mirror of
https://github.com/NotAShelf/stash.git
synced 2026-05-20 22:08:56 +00:00
commands: more consistent error propagation
Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: I6a6a69647a0eb8de028e4251465fbb94f0a14cef
This commit is contained in:
parent
ae98cc0b86
commit
c9a73b462d
4 changed files with 66 additions and 71 deletions
|
|
@ -8,15 +8,8 @@ pub trait DeleteCommand {
|
|||
|
||||
impl DeleteCommand for SqliteClipboardDb {
|
||||
fn delete(&self, input: impl Read) -> Result<usize, StashError> {
|
||||
match self.delete_entries(input) {
|
||||
Ok(deleted) => {
|
||||
log::info!("Deleted {deleted} entries");
|
||||
Ok(deleted)
|
||||
},
|
||||
Err(e) => {
|
||||
log::error!("Failed to delete entries: {e}");
|
||||
Err(e)
|
||||
},
|
||||
}
|
||||
let deleted = self.delete_entries(input)?;
|
||||
log::info!("Deleted {deleted} entries");
|
||||
Ok(deleted)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue