mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 04:19:13 +00:00
remove Canceled from API impl
This commit is contained in:
parent
02c3d2f78e
commit
05ba45c667
8 changed files with 61 additions and 76 deletions
|
@ -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<Vec<Runnable>> {
|
||||
pub(crate) fn runnables(db: &RootDatabase, file_id: FileId) -> Vec<Runnable> {
|
||||
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<Runnable> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue