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