mirror of
https://github.com/aljazceru/turso.git
synced 2026-01-27 03:44:25 +01:00
Store owned strings in InsertEmitCtx for borrow-checker reasons
This commit is contained in:
@@ -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)?,
|
||||
));
|
||||
|
||||
Reference in New Issue
Block a user