aboutsummaryrefslogtreecommitdiff
path: root/helix-lsp/src/client.rs
diff options
context:
space:
mode:
authorBlaž Hrastnik2021-04-06 10:45:14 +0000
committerBlaž Hrastnik2021-04-06 10:51:15 +0000
commit0e9ecccfc12f4972360b516bd56222894f315d58 (patch)
tree0a9444cfab3f072995f823037be7558fa4c41572 /helix-lsp/src/client.rs
parent91462af546619740c93181b88a7908e481e6d6ab (diff)
clippy: Drop or-patterns for now because they're not on stable rust yet
Diffstat (limited to 'helix-lsp/src/client.rs')
-rw-r--r--helix-lsp/src/client.rs16
1 files changed, 7 insertions, 9 deletions
diff --git a/helix-lsp/src/client.rs b/helix-lsp/src/client.rs
index 74f5fa06..49495b84 100644
--- a/helix-lsp/src/client.rs
+++ b/helix-lsp/src/client.rs
@@ -384,13 +384,11 @@ impl Client {
let capabilities = self.capabilities.as_ref().unwrap();
let sync_capabilities = match capabilities.text_document_sync {
- Some(
- lsp::TextDocumentSyncCapability::Kind(kind)
- | lsp::TextDocumentSyncCapability::Options(lsp::TextDocumentSyncOptions {
- change: Some(kind),
- ..
- }),
- ) => kind,
+ Some(lsp::TextDocumentSyncCapability::Kind(kind))
+ | Some(lsp::TextDocumentSyncCapability::Options(lsp::TextDocumentSyncOptions {
+ change: Some(kind),
+ ..
+ })) => kind,
// None | SyncOptions { changes: None }
_ => return Ok(()),
};
@@ -540,7 +538,7 @@ impl Client {
// check if we're able to format
match capabilities.document_formatting_provider {
- Some(lsp::OneOf::Left(true) | lsp::OneOf::Right(_)) => (),
+ Some(lsp::OneOf::Left(true)) | Some(lsp::OneOf::Right(_)) => (),
// None | Some(false)
_ => return Ok(Vec::new()),
};
@@ -569,7 +567,7 @@ impl Client {
// check if we're able to format
match capabilities.document_range_formatting_provider {
- Some(lsp::OneOf::Left(true) | lsp::OneOf::Right(_)) => (),
+ Some(lsp::OneOf::Left(true)) | Some(lsp::OneOf::Right(_)) => (),
// None | Some(false)
_ => return Ok(Vec::new()),
};