Skip to content

Commit 504ce28

Browse files
committed
Fix borrow in drop_indices patch — iterate Vec by reference
cargo failed with E0308 expected &Arc<Index>, found Arc<Index> on `alloc_cursor_index(None, index)`. The original code iterated over an iterator yielding &Arc<Index>; collecting into Vec<Arc<Index>> and iterating with `for index in indices` yields owned Arc<Index>. Iterate `for index in &indices` so `index` matches the original &Arc<Index> binding. Verified with a local cargo check against 375f5d55e26aa90c54abaadce7e035d8d0c6893d.
1 parent 8c56b0a commit 504ce28

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

.github/workflows/phpunit-tests-turso.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -707,7 +707,7 @@ jobs:
707707
" let indices: Vec<_> = resolver.with_schema(database_id, |s| {\n"
708708
" s.get_indices(tbl_name.name.as_str()).cloned().collect()\n"
709709
" });\n"
710-
" for index in indices {\n"
710+
" for index in &indices {\n"
711711
)
712712
assert old in s, 'translate_drop_table get_indices block not found'
713713
open(p, 'w').write(s.replace(old, new, 1))

0 commit comments

Comments
 (0)