Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'helix-view/src/handlers/lsp.rs')
-rw-r--r--helix-view/src/handlers/lsp.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/helix-view/src/handlers/lsp.rs b/helix-view/src/handlers/lsp.rs
index 1fd2289d..e76b4c63 100644
--- a/helix-view/src/handlers/lsp.rs
+++ b/helix-view/src/handlers/lsp.rs
@@ -244,7 +244,7 @@ impl Editor {
ResourceOp::Create(op) => {
let uri = Uri::try_from(&op.uri)?;
let path = uri.as_path().expect("URIs are valid paths");
- let ignore_if_exists = op.options.as_ref().map_or(false, |options| {
+ let ignore_if_exists = op.options.as_ref().is_some_and(|options| {
!options.overwrite.unwrap_or(false) && options.ignore_if_exists.unwrap_or(false)
});
if !ignore_if_exists || !path.exists() {
@@ -288,7 +288,7 @@ impl Editor {
let from = from_uri.as_path().expect("URIs are valid paths");
let to_uri = Uri::try_from(&op.new_uri)?;
let to = to_uri.as_path().expect("URIs are valid paths");
- let ignore_if_exists = op.options.as_ref().map_or(false, |options| {
+ let ignore_if_exists = op.options.as_ref().is_some_and(|options| {
!options.overwrite.unwrap_or(false) && options.ignore_if_exists.unwrap_or(false)
});
if !ignore_if_exists || !to.exists() {