Skip to content

Commit

Permalink
move all returns to match
Browse files Browse the repository at this point in the history
  • Loading branch information
woojiq committed Sep 26, 2023
1 parent 8290ae1 commit 326e653
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions helix-lsp/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -765,19 +765,20 @@ impl Registry {
return (name.to_owned(), Ok(client.clone()));
}
}
let client = match self.start_client(
match self.start_client(
name.clone(),
language_config,
doc_path,
root_dirs,
enable_snippets,
) {
Ok(client) => client,
Err(err) => return (name.to_owned(), Err(err)),
};
let clients = self.inner.entry(name.clone()).or_default();
clients.push(client.clone());
(name.clone(), Ok(client))
Ok(client) => {
let clients = self.inner.entry(name.to_owned()).or_default();
clients.push(client.clone());
(name.clone(), Ok(client))
}
Err(err) => (name.to_owned(), Err(err)),
}
},
)
}
Expand Down

0 comments on commit 326e653

Please sign in to comment.