Refactor: Fix clippy warnings and introduce AppError

This commit is contained in:
Riz Ashraf committed 2026-09-30 20:43:28 +01:00
1 parent 3add6c3d31
commit 4e1a633dbd
13 files changed
+129 -103

No files matched your search

+4 -4
View File
@@ -258,7 +258,7 @@ impl MemoryIndex {
}
pub fn add_task_sync(&self, t: &Task) {
println!("add_task_sync called for task: {}", t.id);
// println!("add_task_sync called for task: {}", t.id);
if let Ok(writer) = self.writer.lock() {
let _res = writer.add_document(doc!(
self.id_field => t.id.as_str(),
@@ -267,12 +267,12 @@ impl MemoryIndex {
self.type_field => "task",
self.namespace_field => "global"
));
println!("Writer add_document returned id/result");
// println!("Writer add_document returned id/result");
self.needs_commit
.store(true, std::sync::atomic::Ordering::SeqCst);
println!("Needs_commit set to true in add_task_sync");
// println!("Needs_commit set to true in add_task_sync");
} else {
println!("Failed to acquire writer lock in add_task_sync");
// println!("Failed to acquire writer lock in add_task_sync");
}
}