aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_lsp_server
diff options
context:
space:
mode:
authorAlan Du <[email protected]>2018-10-16 16:51:58 +0100
committerAlan Du <[email protected]>2018-10-18 00:42:23 +0100
commitd493a4476c2059924d032fbf01dda091601f9667 (patch)
tree74c1249cba67c8c9824e618fcdea53b97b571a7b /crates/ra_lsp_server
parent5db663d61fb8b006e3b84ef3bcc9cddbe94e5f49 (diff)
clippy: Use if lets and remove redundant returns
Diffstat (limited to 'crates/ra_lsp_server')
-rw-r--r--crates/ra_lsp_server/src/server_world.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/crates/ra_lsp_server/src/server_world.rs b/crates/ra_lsp_server/src/server_world.rs
index 35ff65ea1..69b2a1cd1 100644
--- a/crates/ra_lsp_server/src/server_world.rs
+++ b/crates/ra_lsp_server/src/server_world.rs
@@ -73,9 +73,7 @@ impl ServerWorldState {
73 events 73 events
74 .into_iter() 74 .into_iter()
75 .map(|event| { 75 .map(|event| {
76 let text = match event.kind { 76 let FileEventKind::Add(text) = event.kind;
77 FileEventKind::Add(text) => text,
78 };
79 (event.path, text) 77 (event.path, text)
80 }) 78 })
81 .map(|(path, text)| (pm.get_or_insert(path, Root::Lib), text)) 79 .map(|(path, text)| (pm.get_or_insert(path, Root::Lib), text))