diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-07-04 22:56:36 +0100 |
---|---|---|
committer | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-07-04 22:56:36 +0100 |
commit | b1bf434dfcf81ac681a9e152628f9eecde68470a (patch) | |
tree | 51ea069481d3a5eefa9ec1f558a12c85690dabce /crates/ra_lsp_server | |
parent | c6a6e43372de9530ec7df0f38352466ed107e1a2 (diff) | |
parent | e7fb6c83cc33facf0d74e253bd193afc46b1dc5c (diff) |
Merge #1482
1482: Some clippy fixes for 1.36 r=kjeremy a=kjeremy
Some clippy fixes now that 1.36 is released. ~~Plus the requisite format run (I can rebase after #1481 is merged to make this cleaner) .~~
The change from `map(|it| *it)` to `copied()` changes the minimum rust stable to 1.36.
Co-authored-by: Jeremy Kolb <[email protected]>
Diffstat (limited to 'crates/ra_lsp_server')
-rw-r--r-- | crates/ra_lsp_server/src/conv.rs | 2 | ||||
-rw-r--r-- | crates/ra_lsp_server/src/main_loop.rs | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/crates/ra_lsp_server/src/conv.rs b/crates/ra_lsp_server/src/conv.rs index c8128f55b..32e67838e 100644 --- a/crates/ra_lsp_server/src/conv.rs +++ b/crates/ra_lsp_server/src/conv.rs | |||
@@ -171,7 +171,7 @@ impl Conv for ra_ide_api::Documentation { | |||
171 | fn conv(self) -> Documentation { | 171 | fn conv(self) -> Documentation { |
172 | Documentation::MarkupContent(MarkupContent { | 172 | Documentation::MarkupContent(MarkupContent { |
173 | kind: MarkupKind::Markdown, | 173 | kind: MarkupKind::Markdown, |
174 | value: crate::markdown::mark_fenced_blocks_as_rust(self.as_str()).into(), | 174 | value: crate::markdown::mark_fenced_blocks_as_rust(self.as_str()), |
175 | }) | 175 | }) |
176 | } | 176 | } |
177 | } | 177 | } |
diff --git a/crates/ra_lsp_server/src/main_loop.rs b/crates/ra_lsp_server/src/main_loop.rs index cb73e6586..c44fc6603 100644 --- a/crates/ra_lsp_server/src/main_loop.rs +++ b/crates/ra_lsp_server/src/main_loop.rs | |||
@@ -398,7 +398,8 @@ fn on_notification( | |||
398 | Ok(mut params) => { | 398 | Ok(mut params) => { |
399 | let uri = params.text_document.uri; | 399 | let uri = params.text_document.uri; |
400 | let path = uri.to_file_path().map_err(|()| format!("invalid uri: {}", uri))?; | 400 | let path = uri.to_file_path().map_err(|()| format!("invalid uri: {}", uri))?; |
401 | let text = params.content_changes.pop().ok_or_else(|| format!("empty changes"))?.text; | 401 | let text = |
402 | params.content_changes.pop().ok_or_else(|| "empty changes".to_string())?.text; | ||
402 | state.vfs.write().change_file_overlay(path.as_path(), text); | 403 | state.vfs.write().change_file_overlay(path.as_path(), text); |
403 | return Ok(()); | 404 | return Ok(()); |
404 | } | 405 | } |