chore: suppress dead_code warning on truncate_to_chars, fix test formatting

- types.rs: add #[allow(dead_code)] to truncate_to_chars now that
  data-layer truncation was removed in favor of flex-width rendering
- timeline_seed_tests.rs: reformat multi-line assert_eq for clarity
- ollama_mgmt.rs: collapse method chain formatting
This commit is contained in:
teernisse
2026-03-13 11:13:40 -04:00
parent 20753608e8
commit e4cf4e872d
3 changed files with 7 additions and 5 deletions

View File

@@ -68,10 +68,7 @@ pub fn find_ollama_binary() -> Option<PathBuf> {
"/snap/bin/ollama",
];
WELL_KNOWN
.iter()
.map(PathBuf::from)
.find(|p| p.is_file())
WELL_KNOWN.iter().map(PathBuf::from).find(|p| p.is_file())
}
/// TCP-connect to Ollama's port. Tries all resolved addresses (IPv4/IPv6)

View File

@@ -288,7 +288,11 @@ fn test_seed_evidence_snippet_truncated() {
if let TimelineEventType::NoteEvidence { snippet, .. } =
&result.evidence_notes[0].event_type
{
assert_eq!(snippet.chars().count(), 500, "snippet should preserve full body text");
assert_eq!(
snippet.chars().count(),
500,
"snippet should preserve full body text"
);
} else {
panic!("Expected NoteEvidence");
}

View File

@@ -103,6 +103,7 @@ pub enum TimelineEventType {
}
/// Truncate a string to at most `max_chars` characters on a safe UTF-8 boundary.
#[allow(dead_code)]
pub(crate) fn truncate_to_chars(s: &str, max_chars: usize) -> String {
let char_count = s.chars().count();
if char_count <= max_chars {