mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 14:21:44 +00:00
ModuleSource is ItemSource
This commit is contained in:
parent
a9e4142f43
commit
45fce90349
4 changed files with 40 additions and 51 deletions
|
@ -131,6 +131,10 @@ impl SourceFileItems {
|
|||
.unwrap();
|
||||
id
|
||||
}
|
||||
pub fn id_of_source_file(&self) -> SourceFileItemId {
|
||||
let (id, _syntax) = self.arena.iter().next().unwrap();
|
||||
id
|
||||
}
|
||||
}
|
||||
|
||||
impl Index<SourceFileItemId> for SourceFileItems {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue