diff options
author | Blaž Hrastnik | 2022-06-27 08:27:44 +0000 |
---|---|---|
committer | Blaž Hrastnik | 2022-06-27 08:27:44 +0000 |
commit | 24f03097e3b4aef62aa56bb27e0853b60a4cb417 (patch) | |
tree | 29c37c06d8787710f5140557fb11da73013bb2fe /helix-lsp/src/client.rs | |
parent | 33d287a9ad4e72311cf74c7070406626f8cad4bb (diff) |
Remove some more unwraps
Diffstat (limited to 'helix-lsp/src/client.rs')
-rw-r--r-- | helix-lsp/src/client.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/helix-lsp/src/client.rs b/helix-lsp/src/client.rs index 8ee9c9d7..cf6706b5 100644 --- a/helix-lsp/src/client.rs +++ b/helix-lsp/src/client.rs @@ -271,8 +271,8 @@ impl Client { // ------------------------------------------------------------------------------------------- pub(crate) async fn initialize(&self) -> Result<lsp::InitializeResult> { - if self.config.is_some() { - log::info!("Using custom LSP config: {}", self.config.as_ref().unwrap()); + if let Some(config) = &self.config { + log::info!("Using custom LSP config: {}", config); } #[allow(deprecated)] @@ -896,8 +896,8 @@ impl Client { Some(lsp::OneOf::Left(true)) | Some(lsp::OneOf::Right(_)) => (), // None | Some(false) _ => { + log::warn!("rename_symbol failed: The server does not support rename"); let err = "The server does not support rename"; - log::warn!("rename_symbol failed: {}", err); return Err(anyhow!(err)); } }; |