cargo fmt

This commit is contained in:
Michael Davis 2024-05-07 11:35:49 -04:00
parent 9dd51e75e0
commit 5c11af1479
5 changed files with 15 additions and 12 deletions

View file

@ -678,7 +678,7 @@ impl Registry {
pub fn remove_by_id(&mut self, id: LanguageServerId) {
let Some(client) = self.inner.remove(id) else {
log::error!("client was already removed");
return
return;
};
self.file_event_handler.remove_client(id);
let instances = self

View file

@ -111,7 +111,9 @@ impl AsyncHook for ResolveTimeout {
}
fn finish_debounce(&mut self) {
let Some(request) = self.next_request.take() else { return };
let Some(request) = self.next_request.take() else {
return;
};
let (tx, rx) = helix_event::cancelation();
self.in_flight = Some((tx, request.item.clone()));
tokio::spawn(request.execute(rx));

View file

@ -119,8 +119,7 @@ pub fn request_signature_help(
// Do not show the message if signature help was invoked
// automatically on backspace, trigger characters, etc.
if invoked == SignatureHelpInvoked::Manual {
editor
.set_error("No configured language server supports signature-help");
editor.set_error("No configured language server supports signature-help");
}
return;
};

View file

@ -233,7 +233,9 @@ fn read_from_clipboard<'a>(
// If we're pasting the same values that we just yanked, re-use
// the saved values. This allows pasting multiple selections
// even when yanked to a clipboard.
let Some(values) = saved_values else { return RegisterValues::new(iter::once(contents.into())) };
let Some(values) = saved_values else {
return RegisterValues::new(iter::once(contents.into()));
};
if contents_are_saved(values, &contents) {
RegisterValues::new(values.iter().map(Cow::from).rev())