chore: apply cargo fmt + clippy cleanup across crate

Silence forward-looking dead_code on unused DAO modules, annotate
individual placeholder items, rewrite tautological assert!(true/false)
in token tests as panic! arms, and pick up fmt drift.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Cameron
2026-04-18 16:50:15 -04:00
committed by cameron
parent a0f3bfab5f
commit c2ee3996be
22 changed files with 106 additions and 67 deletions

View File

@@ -1,3 +1,5 @@
#![allow(dead_code)]
use diesel::prelude::*;
use diesel::sqlite::SqliteConnection;
use std::ops::DerefMut;
@@ -230,7 +232,7 @@ impl SqliteKnowledgeDao {
}
fn deserialize_embedding(bytes: &[u8]) -> Result<Vec<f32>, DbError> {
if bytes.len() % 4 != 0 {
if !bytes.len().is_multiple_of(4) {
return Err(DbError::new(DbErrorKind::QueryError));
}
Ok(bytes
@@ -535,7 +537,6 @@ impl KnowledgeDao for SqliteKnowledgeDao {
conn.transaction::<(i64, i64), diesel::result::Error, _>(|conn| {
use schema::entity_facts::dsl as ef;
use schema::entity_photo_links::dsl as epl;
// 1. Re-point facts where source is subject
let facts_updated =