use Source for impl block

This commit is contained in:
Aleksey Kladov 2019-06-11 17:36:52 +03:00
parent f411c2988d
commit a6e339e822
5 changed files with 20 additions and 17 deletions

View file

@ -442,11 +442,8 @@ impl HasSource for Union {
}
impl Union {
pub fn source(
self,
db: &(impl DefDatabase + AstDatabase),
) -> (HirFileId, TreeArc<ast::StructDef>) {
self.id.source(db)
pub fn source(self, db: &(impl DefDatabase + AstDatabase)) -> Source<TreeArc<ast::StructDef>> {
self.id.source(db).into()
}
pub fn name(self, db: &impl DefDatabase) -> Option<Name> {