From 05ba45c667454028c3e65769d6f63fb0f27c1ca8 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 15 Jan 2019 21:02:42 +0300 Subject: remove Canceled from API impl --- crates/ra_ide_api/src/runnables.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'crates/ra_ide_api/src/runnables.rs') diff --git a/crates/ra_ide_api/src/runnables.rs b/crates/ra_ide_api/src/runnables.rs index a3207fdd2..0f9f8deb3 100644 --- a/crates/ra_ide_api/src/runnables.rs +++ b/crates/ra_ide_api/src/runnables.rs @@ -3,7 +3,7 @@ use ra_syntax::{ TextRange, SyntaxNode, ast::{self, AstNode, NameOwner, ModuleItemOwner}, }; -use ra_db::{Cancelable, SyntaxDatabase}; +use ra_db::SyntaxDatabase; use crate::{db::RootDatabase, FileId}; @@ -21,14 +21,13 @@ pub enum RunnableKind { Bin, } -pub(crate) fn runnables(db: &RootDatabase, file_id: FileId) -> Cancelable> { +pub(crate) fn runnables(db: &RootDatabase, file_id: FileId) -> Vec { let source_file = db.source_file(file_id); - let res = source_file + source_file .syntax() .descendants() .filter_map(|i| runnable(db, file_id, i)) - .collect(); - Ok(res) + .collect() } fn runnable(db: &RootDatabase, file_id: FileId, item: &SyntaxNode) -> Option { -- cgit v1.2.3