memoryd: a match guard, not an if in the arm (clippy 1.95)

Clippy 1.95's collapsible_match flags the nested `if` in the
`LogRecord::User` arm of `index_record`, and the workspace pins
rust-version 1.95, so `make gate` failed on titan. An empty user message
now falls to the `_ => {}` arm, which indexes nothing, as before.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-09-25 16:41:44 -07:00
co-authored by Claude Opus 5.5
parent e763ad715e
commit d47fb32483
+7 -9
View File
@@ -221,15 +221,13 @@ impl Index {
return Ok(());
}
match record {
LogRecord::User { time, content } => {
if !content.trim().is_empty() {
let src = Source {
time: time.to_rfc3339(),
role: "owner".to_string(),
..base.clone()
};
self.add(content, &src)?;
}
LogRecord::User { time, content } if !content.trim().is_empty() => {
let src = Source {
time: time.to_rfc3339(),
role: "owner".to_string(),
..base.clone()
};
self.add(content, &src)?;
}
LogRecord::Assistant {
time,