mirror of
https://github.com/NotAShelf/stash.git
synced 2026-04-13 14:33:47 +00:00
stash: refactor error handling and entry deduplication
This includes breaking changes to the database entries, where we have started deduplicating based on hashes instead of full entries. Entry collisions are possible, but highly unlikely. Additionally we use `Box<str>` for error variants to reduce allocations. This is *yet* to give me a non-marginal performance benefit but doesn't hurt to be more correct. Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: I6a6a6964d0a33392da61372214ca3088551564ac
This commit is contained in:
parent
d05ad311a9
commit
a41d72fb6b
7 changed files with 348 additions and 258 deletions
|
|
@ -36,7 +36,7 @@ struct Cli {
|
|||
|
||||
/// Number of recent entries to check for duplicates when storing new
|
||||
/// clipboard data.
|
||||
#[arg(long, default_value_t = 100)]
|
||||
#[arg(long, default_value_t = 20)]
|
||||
max_dedupe_search: u64,
|
||||
|
||||
/// Maximum width (in characters) for clipboard entry previews in list
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue