From 99e84999574ec522c07a864e5734b5f1311768cb Mon Sep 17 00:00:00 2001 From: gfreezy Date: Fri, 18 Jan 2019 16:32:36 +0800 Subject: more idiomatic code --- crates/ra_lsp_server/src/main_loop/handlers.rs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'crates/ra_lsp_server/src') diff --git a/crates/ra_lsp_server/src/main_loop/handlers.rs b/crates/ra_lsp_server/src/main_loop/handlers.rs index 9cdca82c4..8f9db68a2 100644 --- a/crates/ra_lsp_server/src/main_loop/handlers.rs +++ b/crates/ra_lsp_server/src/main_loop/handlers.rs @@ -465,14 +465,15 @@ pub fn handle_rename(world: ServerWorld, params: RenameParams) -> Result return Ok(None), + Some(it) => it, + }; - let source_change_req = change.unwrap().try_conv_with(&world)?; + let source_change_req = change.try_conv_with(&world)?; Ok(Some(source_change_req.workspace_edit)) } -- cgit v1.2.3