mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 06:41:48 +00:00
Stop using an Arc when setting the file text
This commit is contained in:
parent
02b6c181dd
commit
0f43b55e83
11 changed files with 21 additions and 24 deletions
|
@ -575,7 +575,7 @@ fn salsa_bug() {
|
|||
}
|
||||
";
|
||||
|
||||
db.set_file_text(pos.file_id, Arc::from(new_text));
|
||||
db.set_file_text(pos.file_id, new_text);
|
||||
|
||||
let module = db.module_for_file(pos.file_id);
|
||||
let crate_def_map = module.def_map(&db);
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
use base_db::SourceDatabaseExt2 as _;
|
||||
use test_fixture::WithFixture;
|
||||
use triomphe::Arc;
|
||||
|
||||
use crate::{db::HirDatabase, test_db::TestDB};
|
||||
|
||||
|
@ -33,7 +32,7 @@ fn foo() -> i32 {
|
|||
1
|
||||
}";
|
||||
|
||||
db.set_file_text(pos.file_id, Arc::from(new_text));
|
||||
db.set_file_text(pos.file_id, new_text);
|
||||
|
||||
{
|
||||
let events = db.log_executed(|| {
|
||||
|
@ -85,7 +84,7 @@ fn baz() -> i32 {
|
|||
}
|
||||
";
|
||||
|
||||
db.set_file_text(pos.file_id, Arc::from(new_text));
|
||||
db.set_file_text(pos.file_id, new_text);
|
||||
|
||||
{
|
||||
let events = db.log_executed(|| {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue