From 6636f56e79b55f22b88094b7edaed6ec88880500 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 30 Jul 2020 00:23:03 +0200 Subject: Rename ModuleItem -> Item --- crates/ra_ide/src/completion/complete_fn_param.rs | 2 +- crates/ra_ide/src/runnables.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'crates/ra_ide/src') diff --git a/crates/ra_ide/src/completion/complete_fn_param.rs b/crates/ra_ide/src/completion/complete_fn_param.rs index db2abb4f1..7a53083f5 100644 --- a/crates/ra_ide/src/completion/complete_fn_param.rs +++ b/crates/ra_ide/src/completion/complete_fn_param.rs @@ -28,7 +28,7 @@ pub(super) fn complete_fn_param(acc: &mut Completions, ctx: &CompletionContext) } }; for item in items { - if let ast::ModuleItem::FnDef(func) = item { + if let ast::Item::FnDef(func) = item { if Some(&func) == me.as_ref() { continue; } diff --git a/crates/ra_ide/src/runnables.rs b/crates/ra_ide/src/runnables.rs index 45e0a7d85..f612835c2 100644 --- a/crates/ra_ide/src/runnables.rs +++ b/crates/ra_ide/src/runnables.rs @@ -246,12 +246,12 @@ fn has_test_function_or_multiple_test_submodules(module: &ast::Module) -> bool { for item in item_list.items() { match item { - ast::ModuleItem::FnDef(f) => { + ast::Item::FnDef(f) => { if has_test_related_attribute(&f) { return true; } } - ast::ModuleItem::Module(submodule) => { + ast::Item::Module(submodule) => { if has_test_function_or_multiple_test_submodules(&submodule) { number_of_test_submodules += 1; } -- cgit v1.2.3