From 50fbd9a3a2bd9e4bff6b070f641231815fb6cc51 Mon Sep 17 00:00:00 2001 From: Jussi Saurio Date: Thu, 13 Nov 2025 09:35:09 +0200 Subject: [PATCH] Store owned strings in InsertEmitCtx for borrow-checker reasons --- core/translate/insert.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/translate/insert.rs b/core/translate/insert.rs index 880e47399..3593415dd 100644 --- a/core/translate/insert.rs +++ b/core/translate/insert.rs @@ -94,7 +94,7 @@ pub struct InsertEmitCtx<'a> { /// Index cursors we need to populate for this table /// (idx name, root_page, idx cursor id) - pub idx_cursors: Vec<(&'a String, i64, usize)>, + pub idx_cursors: Vec<(String, i64, usize)>, /// Context for if the insert values are materialized first /// into a temporary table @@ -146,7 +146,7 @@ impl<'a> InsertEmitCtx<'a> { let mut idx_cursors = Vec::new(); for idx in indices { idx_cursors.push(( - &idx.name, + idx.name.clone(), idx.root_page, program.alloc_cursor_index(None, idx)?, ));