From d47fb32483f69e57ea5c41d865e0561013fe8aa0 Mon Sep 17 00:00:00 2001 From: Kyle Isom Date: Fri, 25 Sep 2026 00:52:17 -0700 Subject: [PATCH] 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) --- crates/memoryd/src/index.rs | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/crates/memoryd/src/index.rs b/crates/memoryd/src/index.rs index e714585..e3d7f6b 100644 --- a/crates/memoryd/src/index.rs +++ b/crates/memoryd/src/index.rs @@ -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,