@@ -212,11 +212,11 @@ impl<'a> CompletionContext<'a> {
212
212
// policy handling is important to Supabase, but they are a PostgreSQL specific extension,
213
213
// so the tree_sitter_sql language does not support it.
214
214
// We infer the context manually.
215
- if PolicyParser :: looks_like_matching_stmt ( & params. text ) {
215
+ if PolicyParser :: looks_like_matching_stmt ( params. text ) {
216
216
ctx. gather_policy_context ( ) ;
217
- } else if GrantParser :: looks_like_matching_stmt ( & params. text ) {
217
+ } else if GrantParser :: looks_like_matching_stmt ( params. text ) {
218
218
ctx. gather_grant_context ( ) ;
219
- } else if RevokeParser :: looks_like_matching_stmt ( & params. text ) {
219
+ } else if RevokeParser :: looks_like_matching_stmt ( params. text ) {
220
220
ctx. gather_revoke_context ( ) ;
221
221
} else {
222
222
ctx. gather_tree_context ( ) ;
@@ -230,7 +230,7 @@ impl<'a> CompletionContext<'a> {
230
230
let revoke_context = RevokeParser :: get_context ( self . text , self . position ) ;
231
231
232
232
self . node_under_cursor = Some ( NodeUnderCursor :: CustomNode {
233
- text : revoke_context. node_text . into ( ) ,
233
+ text : revoke_context. node_text ,
234
234
range : revoke_context. node_range ,
235
235
kind : revoke_context. node_kind . clone ( ) ,
236
236
previous_node_kind : None ,
@@ -258,7 +258,7 @@ impl<'a> CompletionContext<'a> {
258
258
let grant_context = GrantParser :: get_context ( self . text , self . position ) ;
259
259
260
260
self . node_under_cursor = Some ( NodeUnderCursor :: CustomNode {
261
- text : grant_context. node_text . into ( ) ,
261
+ text : grant_context. node_text ,
262
262
range : grant_context. node_range ,
263
263
kind : grant_context. node_kind . clone ( ) ,
264
264
previous_node_kind : None ,
@@ -286,7 +286,7 @@ impl<'a> CompletionContext<'a> {
286
286
let policy_context = PolicyParser :: get_context ( self . text , self . position ) ;
287
287
288
288
self . node_under_cursor = Some ( NodeUnderCursor :: CustomNode {
289
- text : policy_context. node_text . into ( ) ,
289
+ text : policy_context. node_text ,
290
290
range : policy_context. node_range ,
291
291
kind : policy_context. node_kind . clone ( ) ,
292
292
previous_node_kind : Some ( policy_context. previous_node_kind ) ,
0 commit comments