From 1205b9b04d0d49f4a7b4048a1593859fcffec79b Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Fri, 27 Nov 2026 19:21:29 +0100 Subject: [PATCH] cultcache-rs: rows_at_key takes a static-keyed table; drop a stray mut Co-Authored-By: Claude Sonnet 5.5 --- packages/cultcache-rs/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/cultcache-rs/src/lib.rs b/packages/cultcache-rs/src/lib.rs index 40e9b740..6e7831b2 100644 --- a/packages/cultcache-rs/src/lib.rs +++ b/packages/cultcache-rs/src/lib.rs @@ -3017,7 +3017,7 @@ fn read_redb_entry( /// Every row a redb table holds at `key`, whatever its type. Identities sort by their encoded (type, key), and every row of one /// type shares the prefix `0x92` + msgpack str(type), so the types are walked by skip-scan: read the first row at or after a /// bound, point-get that type's row at `key`, then continue from the successor of the type's prefix. O(types x log n), not O(n). -fn rows_at_key<'a>(table: &impl ReadableTable<&'a [u8], &'a [u8]>, key: &str) -> Result> { +fn rows_at_key(table: &impl ReadableTable<&'static [u8], &'static [u8]>, key: &str) -> Result> { let mut rows = Vec::new(); let mut lower = Vec::::new(); loop { @@ -9351,7 +9351,7 @@ mod tests { let row = test_envelope(kind, key, b"p"); table.insert(redb_identity(&row)?.as_slice(), rmp_serde::to_vec(&row)?.as_slice())?; } - let mut at = |key: &str| -> Result> { + let at = |key: &str| -> Result> { let mut types: Vec = rows_at_key(&table, key)?.into_iter().map(|row| row.r#type).collect(); types.sort(); Ok(types)