chore: fix clippy warnings and run rustfmt

This commit is contained in:
Riz Ashraf committed 2026-10-09 00:39:50 +01:00
1 parent fecd8bf33f
commit 3765e6b05d
21 files changed
+420 -369

No files matched your search

+7 -7
View File
@@ -87,9 +87,10 @@ impl ClipboardCacheState {
pub fn push_text(&mut self, text: CachedClipboardText) {
if let Some(ref prev) = self.last_text
&& prev.text == text.text {
return;
}
&& prev.text == text.text
{
return;
}
self.last_text = Some(text.clone());
self.history.push_front(ClipboardHistoryItem::Text(text));
if self.history.len() > 20 {
@@ -141,10 +142,9 @@ impl MemoryState {
pub fn new(base_dir_str: &str) -> Self {
let is_in_memory = base_dir_str == ":memory:";
let base = std::path::PathBuf::from(base_dir_str);
if !is_in_memory
&& let Err(e) = std::fs::create_dir_all(&base) {
tracing::error!("Failed to create store directory at {:?}: {}", base, e);
}
if !is_in_memory && let Err(e) = std::fs::create_dir_all(&base) {
tracing::error!("Failed to create store directory at {:?}: {}", base, e);
}
let db = crate::db::init_redb(&base);