Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide/src/lib.rs')
| -rw-r--r-- | crates/ide/src/lib.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ide/src/lib.rs b/crates/ide/src/lib.rs index b227addc4c..d14cf83f0d 100644 --- a/crates/ide/src/lib.rs +++ b/crates/ide/src/lib.rs @@ -244,7 +244,7 @@ impl Analysis { Err("Analysis::from_single_file has no target layout".into()), None, ); - change.change_file(file_id, Some(Arc::new(text))); + change.change_file(file_id, Some(Arc::from(text))); change.set_crate_graph(crate_graph); host.apply_change(change); (host.analysis(), file_id) @@ -263,7 +263,7 @@ impl Analysis { } /// Gets the text of the source file. - pub fn file_text(&self, file_id: FileId) -> Cancellable<Arc<String>> { + pub fn file_text(&self, file_id: FileId) -> Cancellable<Arc<str>> { self.with_db(|db| db.file_text(file_id)) } |