mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
use Source more
This commit is contained in:
parent
91c120ccea
commit
2a1fe26b6d
7 changed files with 39 additions and 64 deletions
|
@ -456,11 +456,8 @@ pub struct Enum {
|
|||
}
|
||||
|
||||
impl Enum {
|
||||
pub fn source(
|
||||
self,
|
||||
db: &(impl DefDatabase + AstDatabase),
|
||||
) -> (HirFileId, TreeArc<ast::EnumDef>) {
|
||||
self.id.source(db)
|
||||
pub fn source(self, db: &(impl DefDatabase + AstDatabase)) -> Source<TreeArc<ast::EnumDef>> {
|
||||
self.id.source(db).into()
|
||||
}
|
||||
|
||||
pub fn module(self, db: &impl HirDatabase) -> Module {
|
||||
|
@ -509,7 +506,7 @@ impl EnumVariant {
|
|||
pub fn source(
|
||||
&self,
|
||||
db: &(impl DefDatabase + AstDatabase),
|
||||
) -> (HirFileId, TreeArc<ast::EnumVariant>) {
|
||||
) -> Source<TreeArc<ast::EnumVariant>> {
|
||||
self.source_impl(db)
|
||||
}
|
||||
pub fn module(&self, db: &impl HirDatabase) -> Module {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue