diff options
author | Aleksey Kladov <[email protected]> | 2019-01-06 13:05:59 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-01-06 14:35:57 +0000 |
commit | c303e6fbdfd8d04b645796489766e912d2cb3009 (patch) | |
tree | ff1ca323cc9dea0bc18001d39f1c9c979cef6dec /crates/ra_analysis/src/runnables.rs | |
parent | a7f4f7bfcc524a55ba559e0141a70aa799a8686d (diff) |
fix ra_analysis to work with the new API
Diffstat (limited to 'crates/ra_analysis/src/runnables.rs')
-rw-r--r-- | crates/ra_analysis/src/runnables.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/crates/ra_analysis/src/runnables.rs b/crates/ra_analysis/src/runnables.rs index f24aa514a..216209098 100644 --- a/crates/ra_analysis/src/runnables.rs +++ b/crates/ra_analysis/src/runnables.rs | |||
@@ -72,12 +72,15 @@ fn runnable_mod(db: &RootDatabase, file_id: FileId, module: ast::Module) -> Opti | |||
72 | let range = module.syntax().range(); | 72 | let range = module.syntax().range(); |
73 | let module = | 73 | let module = |
74 | hir::source_binder::module_from_child_node(db, file_id, module.syntax()).ok()??; | 74 | hir::source_binder::module_from_child_node(db, file_id, module.syntax()).ok()??; |
75 | |||
76 | // FIXME: thread cancellation instead of `.ok`ing | ||
75 | let path = module | 77 | let path = module |
76 | .path_to_root(db) | 78 | .path_to_root(db) |
77 | .ok()? | 79 | .ok()? |
78 | .into_iter() | 80 | .into_iter() |
79 | .rev() | 81 | .rev() |
80 | .filter_map(|it| it.name(db).map(Clone::clone)) | 82 | .filter_map(|it| it.name(db).ok()) |
83 | .filter_map(|it| it) | ||
81 | .join("::"); | 84 | .join("::"); |
82 | Some(Runnable { | 85 | Some(Runnable { |
83 | range, | 86 | range, |