Simplify FileDelegate

This commit is contained in:
Lukas Wirth 2024-08-03 18:00:36 +02:00
parent 000eed1da8
commit fcb88832de
36 changed files with 78 additions and 86 deletions

View file

@ -1,4 +1,4 @@
use base_db::{SourceDatabase, SourceDatabaseExt2 as _};
use base_db::{SourceDatabase, SourceDatabaseFileInputExt as _};
use test_fixture::WithFixture;
use crate::{db::DefDatabase, nameres::tests::TestDB, AdtId, ModuleDefId};

View file

@ -19,7 +19,7 @@ use crate::{
};
#[salsa::database(
base_db::SourceDatabaseExtStorage,
base_db::SourceRootDatabaseStorage,
base_db::SourceDatabaseStorage,
hir_expand::db::ExpandDatabaseStorage,
crate::db::InternDatabaseStorage,
@ -69,9 +69,6 @@ impl fmt::Debug for TestDB {
impl panic::RefUnwindSafe for TestDB {}
impl FileLoader for TestDB {
fn file_text(&self, file_id: FileId) -> Arc<str> {
FileLoaderDelegate(self).file_text(file_id)
}
fn resolve_path(&self, path: AnchoredPath<'_>) -> Option<FileId> {
FileLoaderDelegate(self).resolve_path(path)
}