@@ -251,7 +251,7 @@ fn test_r_file_created_routes_through_add_file() {
251251 assert_eq ! ( root. scripts( & state. db) . len( ) , 1 ) ;
252252 let file_path = FilePath :: from_path_buf ( path. clone ( ) ) . unwrap ( ) ;
253253 let file = state. db . file_by_path ( & file_path) . unwrap ( ) ;
254- assert_eq ! ( file. contents ( & state. db) , "x <- 1\n " ) ;
254+ assert_eq ! ( file. source_text ( & state. db) , "x <- 1\n " ) ;
255255}
256256
257257#[ test]
@@ -280,7 +280,7 @@ fn test_r_file_changed_for_editor_open_file_is_skipped() {
280280 did_change_watched_files ( params, & mut state) . unwrap ( ) ;
281281
282282 let file = state. db . file_by_path ( & file_path) . unwrap ( ) ;
283- assert_eq ! ( file. contents ( & state. db) , "editor_v2\n " ) ;
283+ assert_eq ! ( file. source_text ( & state. db) , "editor_v2\n " ) ;
284284}
285285
286286#[ test]
@@ -318,7 +318,7 @@ fn test_r_file_changed_for_unopened_file_updates_contents() {
318318 . db
319319 . file_by_path( & file_path)
320320 . unwrap( )
321- . contents ( & state. db) ,
321+ . source_text ( & state. db) ,
322322 "v1\n "
323323 ) ;
324324
@@ -333,7 +333,7 @@ fn test_r_file_changed_for_unopened_file_updates_contents() {
333333 . db
334334 . file_by_path( & file_path)
335335 . unwrap( )
336- . contents ( & state. db) ,
336+ . source_text ( & state. db) ,
337337 "v2\n "
338338 ) ;
339339}
@@ -365,7 +365,7 @@ fn test_r_file_deleted_for_editor_open_file_is_skipped() {
365365 did_change_watched_files ( params, & mut state) . unwrap ( ) ;
366366
367367 let file = state. db . file_by_path ( & file_path) . unwrap ( ) ;
368- assert_eq ! ( file. contents ( & state. db) , "editor_v2\n " ) ;
368+ assert_eq ! ( file. source_text ( & state. db) , "editor_v2\n " ) ;
369369}
370370
371371#[ test]
@@ -591,7 +591,7 @@ fn test_did_change_workspace_folders_preserves_open_buffer_across_churn() {
591591 . orphan_root( )
592592 . files( & state. db)
593593 . contains( & after_remove) ) ;
594- assert_eq ! ( after_remove. contents ( & state. db) , "editor <- 2\n " ) ;
594+ assert_eq ! ( after_remove. source_text ( & state. db) , "editor <- 2\n " ) ;
595595
596596 // Re-add the same folder. The file snaps back into pkg.files with
597597 // the same entity and the editor content carries over (the scan's
@@ -602,7 +602,7 @@ fn test_did_change_workspace_folders_preserves_open_buffer_across_churn() {
602602 let after_readd = state. db . file_by_path ( & file_path) . unwrap ( ) ;
603603 assert_eq ! ( file_before, after_readd) ;
604604 assert ! ( after_readd. package( & state. db) . is_some( ) ) ;
605- assert_eq ! ( after_readd. contents ( & state. db) , "editor <- 2\n " ) ;
605+ assert_eq ! ( after_readd. source_text ( & state. db) , "editor <- 2\n " ) ;
606606 // `upsert_root_file` cleaned the orphan reference.
607607 assert ! ( !state
608608 . db
0 commit comments