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:
@@ -221,15 +221,13 @@ impl Index {
|
|||||||
return Ok(());
|
return Ok(());
|
||||||
}
|
}
|
||||||
match record {
|
match record {
|
||||||
LogRecord::User { time, content } => {
|
LogRecord::User { time, content } if !content.trim().is_empty() => {
|
||||||
if !content.trim().is_empty() {
|
let src = Source {
|
||||||
let src = Source {
|
time: time.to_rfc3339(),
|
||||||
time: time.to_rfc3339(),
|
role: "owner".to_string(),
|
||||||
role: "owner".to_string(),
|
..base.clone()
|
||||||
..base.clone()
|
};
|
||||||
};
|
self.add(content, &src)?;
|
||||||
self.add(content, &src)?;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
LogRecord::Assistant {
|
LogRecord::Assistant {
|
||||||
time,
|
time,
|
||||||
|
|||||||
Reference in New Issue
Block a user