From 1836f4db35b29cd325b04978776a902679bd9ce6 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sun, 6 Jan 2019 13:45:55 +0300 Subject: make source cancelable --- crates/ra_hir/src/code_model_api.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/ra_hir/src/code_model_api.rs b/crates/ra_hir/src/code_model_api.rs index f1e891722..6bbc80e17 100644 --- a/crates/ra_hir/src/code_model_api.rs +++ b/crates/ra_hir/src/code_model_api.rs @@ -35,8 +35,8 @@ pub struct Module { } impl Module { - pub fn source(&self, db: &impl HirDatabase) -> (FileId, Option) { - self.source_impl(db) + pub fn source(&self, db: &impl HirDatabase) -> Cancelable<(FileId, Option)> { + Ok(self.source_impl(db)) } /// Returns the crate this module is part of. -- cgit v1.2.3