aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src/ui/picker.rs
diff options
context:
space:
mode:
authorPhilipp Mildenberger2023-07-27 02:57:19 +0000
committerGitHub2023-07-27 02:57:19 +0000
commit8a28f3059398eec7b5496bb1088b4d9870e6eb7e (patch)
tree77cf35ee489ed5367dc2a1ac8b4a0600530ded37 /helix-term/src/ui/picker.rs
parent262a595e5343c5afd0f2570859b63ebf4c12b0fa (diff)
Reformat with nightly rustfmt for better let-else formatting (#7721)
Diffstat (limited to 'helix-term/src/ui/picker.rs')
-rw-r--r--helix-term/src/ui/picker.rs11
1 files changed, 7 insertions, 4 deletions
diff --git a/helix-term/src/ui/picker.rs b/helix-term/src/ui/picker.rs
index 4605e2f1..f80bc512 100644
--- a/helix-term/src/ui/picker.rs
+++ b/helix-term/src/ui/picker.rs
@@ -432,7 +432,7 @@ impl<T: Item + 'static> Picker<T> {
fn handle_idle_timeout(&mut self, cx: &mut Context) -> EventResult {
let Some((current_file, _)) = self.current_file(cx.editor) else {
- return EventResult::Consumed(None)
+ return EventResult::Consumed(None);
};
// Try to find a document in the cache
@@ -459,11 +459,14 @@ impl<T: Item + 'static> Picker<T> {
let callback = move |editor: &mut Editor, compositor: &mut Compositor| {
let Some(syntax) = syntax else {
log::info!("highlighting picker item failed");
- return
+ return;
};
- let Some(Overlay { content: picker, .. }) = compositor.find::<Overlay<Self>>() else {
+ let Some(Overlay {
+ content: picker, ..
+ }) = compositor.find::<Overlay<Self>>()
+ else {
log::info!("picker closed before syntax highlighting finished");
- return
+ return;
};
// Try to find a document in the cache
let doc = match current_file {