@@ -13,7 +13,7 @@ use crate::{CrateGraph, SourceDatabaseExt, SourceDatabaseExt2, SourceRoot, Sourc
1313#[ derive( Default ) ]
1414pub struct FileChange {
1515 pub roots : Option < Vec < SourceRoot > > ,
16- pub files_changed : Vec < ( FileId , Option < Arc < str > > ) > ,
16+ pub files_changed : Vec < ( FileId , Option < String > ) > ,
1717 pub crate_graph : Option < CrateGraph > ,
1818}
1919
@@ -42,7 +42,7 @@ impl FileChange {
4242 self . roots = Some ( roots) ;
4343 }
4444
45- pub fn change_file ( & mut self , file_id : FileId , new_text : Option < Arc < str > > ) {
45+ pub fn change_file ( & mut self , file_id : FileId , new_text : Option < String > ) {
4646 self . files_changed . push ( ( file_id, new_text) )
4747 }
4848
@@ -68,7 +68,7 @@ impl FileChange {
6868 let source_root = db. source_root ( source_root_id) ;
6969 let durability = durability ( & source_root) ;
7070 // XXX: can't actually remove the file, just reset the text
71- let text = text. unwrap_or_else ( || Arc :: from ( "" ) ) ;
71+ let text = text. as_ref ( ) . map ( String :: as_str ) . unwrap_or_else ( || "" ) ;
7272 db. set_file_text_with_durability ( file_id, text, durability)
7373 }
7474 if let Some ( crate_graph) = self . crate_graph {
0 commit comments