From a5da770ec60a73abcc5350f25146be973540063f Mon Sep 17 00:00:00 2001 From: Alan Du Date: Wed, 17 Oct 2018 19:25:37 -0400 Subject: Fix function calls --- crates/ra_lsp_server/src/main.rs | 2 +- crates/ra_lsp_server/src/main_loop/handlers.rs | 4 ++-- crates/ra_lsp_server/src/project_model.rs | 1 - crates/ra_lsp_server/src/vfs.rs | 1 - 4 files changed, 3 insertions(+), 5 deletions(-) (limited to 'crates/ra_lsp_server/src') diff --git a/crates/ra_lsp_server/src/main.rs b/crates/ra_lsp_server/src/main.rs index 9f62347f1..c07eb0140 100644 --- a/crates/ra_lsp_server/src/main.rs +++ b/crates/ra_lsp_server/src/main.rs @@ -18,7 +18,7 @@ fn main() -> Result<()> { .directory("log") .start()?; info!("lifecycle: server started"); - match ::std::panic::catch_unwind(|| main_inner()) { + match ::std::panic::catch_unwind(main_inner) { Ok(res) => { info!("lifecycle: terminating process with {:?}", res); res diff --git a/crates/ra_lsp_server/src/main_loop/handlers.rs b/crates/ra_lsp_server/src/main_loop/handlers.rs index 49bd7895a..3e58e6f54 100644 --- a/crates/ra_lsp_server/src/main_loop/handlers.rs +++ b/crates/ra_lsp_server/src/main_loop/handlers.rs @@ -289,8 +289,8 @@ pub fn handle_runnables( .filter_map(|ws| { let tgt = ws.target_by_root(path)?; Some(( - tgt.package(ws).name(ws).clone(), - tgt.name(ws).clone(), + tgt.package(ws).name(ws), + tgt.name(ws), tgt.kind(ws), )) }) diff --git a/crates/ra_lsp_server/src/project_model.rs b/crates/ra_lsp_server/src/project_model.rs index d170ceb73..cedb67bae 100644 --- a/crates/ra_lsp_server/src/project_model.rs +++ b/crates/ra_lsp_server/src/project_model.rs @@ -173,7 +173,6 @@ pub fn workspace_loader() -> (Worker>, ThreadWat 1, |input_receiver, output_sender| { input_receiver - .into_iter() .map(|path| CargoWorkspace::from_cargo_metadata(path.as_path())) .for_each(|it| output_sender.send(it)) }, diff --git a/crates/ra_lsp_server/src/vfs.rs b/crates/ra_lsp_server/src/vfs.rs index 417a3c19a..6e317d854 100644 --- a/crates/ra_lsp_server/src/vfs.rs +++ b/crates/ra_lsp_server/src/vfs.rs @@ -24,7 +24,6 @@ pub fn roots_loader() -> (Worker)>, ThreadWatc 128, |input_receiver, output_sender| { input_receiver - .into_iter() .map(|path| { debug!("loading {} ...", path.as_path().display()); let events = load_root(path.as_path()); -- cgit v1.2.3