mirror of
https://github.com/NotAShelf/stash.git
synced 2026-05-18 13:08:23 +00:00
Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: I6a6a69647a0eb8de028e4251465fbb94f0a14cef
15 lines
403 B
Rust
15 lines
403 B
Rust
use std::io::Read;
|
|
|
|
use crate::db::{ClipboardDb, SqliteClipboardDb, StashError};
|
|
|
|
pub trait DeleteCommand {
|
|
fn delete(&self, input: impl Read) -> Result<usize, StashError>;
|
|
}
|
|
|
|
impl DeleteCommand for SqliteClipboardDb {
|
|
fn delete(&self, input: impl Read) -> Result<usize, StashError> {
|
|
let deleted = self.delete_entries(input)?;
|
|
log::info!("Deleted {deleted} entries");
|
|
Ok(deleted)
|
|
}
|
|
}
|