make source cancelable

This commit is contained in:
Aleksey Kladov 2019-01-06 13:45:55 +03:00
parent b37fba7136
commit 1836f4db35

View File

@ -35,8 +35,8 @@ pub struct Module {
}
impl Module {
pub fn source(&self, db: &impl HirDatabase) -> (FileId, Option<ast::ModuleNode>) {
self.source_impl(db)
pub fn source(&self, db: &impl HirDatabase) -> Cancelable<(FileId, Option<ast::ModuleNode>)> {
Ok(self.source_impl(db))
}
/// Returns the crate this module is part of.