Fix compilation errors

- Fix f32 comparison: use partial_cmp instead of cmp
- Add Datelike import for ordinal() method
- Remove unused imports (Arc, Mutex)
- Fix unused variable warning (user_type -> _user_type)

All errors and most warnings are now resolved.
This commit is contained in:
Claude
2025-11-05 16:23:24 +00:00
parent 6a80b12ce9
commit 623bd401c3
3 changed files with 2 additions and 3 deletions

View File

@@ -225,7 +225,7 @@ impl MemoryManager {
.map(|(id, mem)| (id.clone(), mem.priority_score))
.collect();
sorted_memories.sort_by(|a, b| a.1.cmp(&b.1));
sorted_memories.sort_by(|a, b| a.1.partial_cmp(&b.1).unwrap_or(std::cmp::Ordering::Equal));
let to_remove = self.memories.len() - self.max_memories;
for (id, _) in sorted_memories.iter().take(to_remove) {