mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +00:00
remove unneded From(..) impl
This commit is contained in:
parent
0dcaded439
commit
26753f0e49
4 changed files with 21 additions and 37 deletions
|
@ -49,7 +49,7 @@ impl HasSource for ImplBlock {
|
|||
fn source(self, db: &(impl DefDatabase + AstDatabase)) -> Source<TreeArc<ast::ImplBlock>> {
|
||||
let source_map = db.impls_in_module_with_source_map(self.module).1;
|
||||
let src = self.module.definition_source(db);
|
||||
(src.file_id, source_map.get(&src.ast, self.impl_id)).into()
|
||||
Source { file_id: src.file_id, ast: source_map.get(&src.ast, self.impl_id) }
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -66,13 +66,6 @@ impl ImplBlock {
|
|||
ImplBlock { module, impl_id }
|
||||
}
|
||||
|
||||
/// Returns the syntax of the impl block
|
||||
pub fn source(&self, db: &(impl DefDatabase + AstDatabase)) -> Source<TreeArc<ast::ImplBlock>> {
|
||||
let source_map = db.impls_in_module_with_source_map(self.module).1;
|
||||
let src = self.module.definition_source(db);
|
||||
(src.file_id, source_map.get(&src.ast, self.impl_id)).into()
|
||||
}
|
||||
|
||||
pub fn id(&self) -> ImplId {
|
||||
self.impl_id
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue