From ceea5eacd814c5bbd8c6789610c87a882e3d72cf Mon Sep 17 00:00:00 2001 From: Blaž Hrastnik Date: Wed, 31 Mar 2021 23:42:16 +0900 Subject: clippy lint --- helix-lsp/src/client.rs | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'helix-lsp/src/client.rs') diff --git a/helix-lsp/src/client.rs b/helix-lsp/src/client.rs index 1d84c4f3..74f5fa06 100644 --- a/helix-lsp/src/client.rs +++ b/helix-lsp/src/client.rs @@ -384,11 +384,13 @@ impl Client { let capabilities = self.capabilities.as_ref().unwrap(); let sync_capabilities = match capabilities.text_document_sync { - Some(lsp::TextDocumentSyncCapability::Kind(kind)) => kind, - Some(lsp::TextDocumentSyncCapability::Options(lsp::TextDocumentSyncOptions { - change: Some(kind), - .. - })) => kind, + Some( + lsp::TextDocumentSyncCapability::Kind(kind) + | lsp::TextDocumentSyncCapability::Options(lsp::TextDocumentSyncOptions { + change: Some(kind), + .. + }), + ) => kind, // None | SyncOptions { changes: None } _ => return Ok(()), }; @@ -537,9 +539,8 @@ impl Client { let capabilities = self.capabilities.as_ref().unwrap(); // check if we're able to format - let _capabilities = match capabilities.document_formatting_provider { - Some(lsp::OneOf::Left(true)) => (), - Some(lsp::OneOf::Right(_)) => (), + match capabilities.document_formatting_provider { + Some(lsp::OneOf::Left(true) | lsp::OneOf::Right(_)) => (), // None | Some(false) _ => return Ok(Vec::new()), }; @@ -567,9 +568,8 @@ impl Client { let capabilities = self.capabilities.as_ref().unwrap(); // check if we're able to format - let _capabilities = match capabilities.document_range_formatting_provider { - Some(lsp::OneOf::Left(true)) => (), - Some(lsp::OneOf::Right(_)) => (), + match capabilities.document_range_formatting_provider { + Some(lsp::OneOf::Left(true) | lsp::OneOf::Right(_)) => (), // None | Some(false) _ => return Ok(Vec::new()), }; -- cgit v1.2.3-70-g09d2