mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 21:35:20 +00:00
remove Cancelable from Module API
This commit is contained in:
parent
91feed736f
commit
ca52cf1ecd
6 changed files with 18 additions and 22 deletions
|
@ -78,12 +78,12 @@ pub enum Problem {
|
|||
|
||||
impl Module {
|
||||
/// Name of this module.
|
||||
pub fn name(&self, db: &impl HirDatabase) -> Cancelable<Option<Name>> {
|
||||
pub fn name(&self, db: &impl HirDatabase) -> Option<Name> {
|
||||
self.name_impl(db)
|
||||
}
|
||||
|
||||
/// Returns a node which defines this module. That is, a file or a `mod foo {}` with items.
|
||||
pub fn definition_source(&self, db: &impl HirDatabase) -> Cancelable<(FileId, ModuleSource)> {
|
||||
pub fn definition_source(&self, db: &impl HirDatabase) -> (FileId, ModuleSource) {
|
||||
self.definition_source_impl(db)
|
||||
}
|
||||
|
||||
|
@ -92,7 +92,7 @@ impl Module {
|
|||
pub fn declaration_source(
|
||||
&self,
|
||||
db: &impl HirDatabase,
|
||||
) -> Cancelable<Option<(FileId, TreeArc<ast::Module>)>> {
|
||||
) -> Option<(FileId, TreeArc<ast::Module>)> {
|
||||
self.declaration_source_impl(db)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue