@@ -13,7 +13,7 @@ use crate::{CrateGraph, SourceDatabaseExt, SourceDatabaseExt2, SourceRoot, Sourc
13
13
#[ derive( Default ) ]
14
14
pub struct FileChange {
15
15
pub roots : Option < Vec < SourceRoot > > ,
16
- pub files_changed : Vec < ( FileId , Option < Arc < str > > ) > ,
16
+ pub files_changed : Vec < ( FileId , Option < String > ) > ,
17
17
pub crate_graph : Option < CrateGraph > ,
18
18
}
19
19
@@ -42,7 +42,7 @@ impl FileChange {
42
42
self . roots = Some ( roots) ;
43
43
}
44
44
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 > ) {
46
46
self . files_changed . push ( ( file_id, new_text) )
47
47
}
48
48
@@ -68,7 +68,7 @@ impl FileChange {
68
68
let source_root = db. source_root ( source_root_id) ;
69
69
let durability = durability ( & source_root) ;
70
70
// 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 ( || "" ) ;
72
72
db. set_file_text_with_durability ( file_id, text, durability)
73
73
}
74
74
if let Some ( crate_graph) = self . crate_graph {
0 commit comments