@@ -219,19 +219,19 @@ mod tests {
219219 . set_language ( tree_sitter_sql:: language ( ) )
220220 . expect ( "Error loading sql language" ) ;
221221
222- let mut tree = parser. parse ( input, None ) . unwrap ( ) ;
222+ let tree = parser. parse ( input, None ) . unwrap ( ) ;
223223
224224 // select | from users; <-- just right, one space after select token, one space before from
225- assert ! ( cursor_inbetween_nodes( & mut tree, TextSize :: new( 7 ) ) ) ;
225+ assert ! ( cursor_inbetween_nodes( & tree, TextSize :: new( 7 ) ) ) ;
226226
227227 // select| from users; <-- still on select token
228- assert ! ( !cursor_inbetween_nodes( & mut tree, TextSize :: new( 6 ) ) ) ;
228+ assert ! ( !cursor_inbetween_nodes( & tree, TextSize :: new( 6 ) ) ) ;
229229
230230 // select |from users; <-- already on from token
231- assert ! ( !cursor_inbetween_nodes( & mut tree, TextSize :: new( 8 ) ) ) ;
231+ assert ! ( !cursor_inbetween_nodes( & tree, TextSize :: new( 8 ) ) ) ;
232232
233233 // select from users;|
234- assert ! ( !cursor_inbetween_nodes( & mut tree, TextSize :: new( 19 ) ) ) ;
234+ assert ! ( !cursor_inbetween_nodes( & tree, TextSize :: new( 19 ) ) ) ;
235235 }
236236
237237 #[ test]
@@ -243,29 +243,29 @@ mod tests {
243243 . set_language ( tree_sitter_sql:: language ( ) )
244244 . expect ( "Error loading sql language" ) ;
245245
246- let mut tree = parser. parse ( input, None ) . unwrap ( ) ;
246+ let tree = parser. parse ( input, None ) . unwrap ( ) ;
247247
248248 // select * from| <-- still on previous token
249249 assert ! ( !cursor_prepared_to_write_token_after_last_node(
250- & mut tree,
250+ & tree,
251251 TextSize :: new( 13 )
252252 ) ) ;
253253
254254 // select * from | <-- too far off, two spaces afterward
255255 assert ! ( !cursor_prepared_to_write_token_after_last_node(
256- & mut tree,
256+ & tree,
257257 TextSize :: new( 15 )
258258 ) ) ;
259259
260260 // select * |from <-- it's within
261261 assert ! ( !cursor_prepared_to_write_token_after_last_node(
262- & mut tree,
262+ & tree,
263263 TextSize :: new( 9 )
264264 ) ) ;
265265
266266 // select * from | <-- just right
267267 assert ! ( cursor_prepared_to_write_token_after_last_node(
268- & mut tree,
268+ & tree,
269269 TextSize :: new( 14 )
270270 ) ) ;
271271 }
@@ -295,26 +295,26 @@ mod tests {
295295 . set_language ( tree_sitter_sql:: language ( ) )
296296 . expect ( "Error loading sql language" ) ;
297297
298- let mut tree = parser. parse ( input, None ) . unwrap ( ) ;
298+ let tree = parser. parse ( input, None ) . unwrap ( ) ;
299299
300300 // select * from ;| <-- it's after the statement
301- assert ! ( !cursor_before_semicolon( & mut tree, TextSize :: new( 19 ) ) ) ;
301+ assert ! ( !cursor_before_semicolon( & tree, TextSize :: new( 19 ) ) ) ;
302302
303303 // select * from| ; <-- still touches the from
304- assert ! ( !cursor_before_semicolon( & mut tree, TextSize :: new( 13 ) ) ) ;
304+ assert ! ( !cursor_before_semicolon( & tree, TextSize :: new( 13 ) ) ) ;
305305
306306 // not okay to be ON the semi.
307307 // select * from |;
308- assert ! ( !cursor_before_semicolon( & mut tree, TextSize :: new( 18 ) ) ) ;
308+ assert ! ( !cursor_before_semicolon( & tree, TextSize :: new( 18 ) ) ) ;
309309
310310 // anything is fine here
311311 // select * from | ;
312312 // select * from | ;
313313 // select * from | ;
314314 // select * from |;
315- assert ! ( cursor_before_semicolon( & mut tree, TextSize :: new( 14 ) ) ) ;
316- assert ! ( cursor_before_semicolon( & mut tree, TextSize :: new( 15 ) ) ) ;
317- assert ! ( cursor_before_semicolon( & mut tree, TextSize :: new( 16 ) ) ) ;
318- assert ! ( cursor_before_semicolon( & mut tree, TextSize :: new( 17 ) ) ) ;
315+ assert ! ( cursor_before_semicolon( & tree, TextSize :: new( 14 ) ) ) ;
316+ assert ! ( cursor_before_semicolon( & tree, TextSize :: new( 15 ) ) ) ;
317+ assert ! ( cursor_before_semicolon( & tree, TextSize :: new( 16 ) ) ) ;
318+ assert ! ( cursor_before_semicolon( & tree, TextSize :: new( 17 ) ) ) ;
319319 }
320320}
0 commit comments