From 8a28f3059398eec7b5496bb1088b4d9870e6eb7e Mon Sep 17 00:00:00 2001 From: Philipp Mildenberger Date: Thu, 27 Jul 2023 04:57:19 +0200 Subject: Reformat with nightly rustfmt for better let-else formatting (#7721) --- helix-core/src/match_brackets.rs | 8 ++++++-- helix-core/src/transaction.rs | 5 ++++- 2 files changed, 10 insertions(+), 3 deletions(-) (limited to 'helix-core') diff --git a/helix-core/src/match_brackets.rs b/helix-core/src/match_brackets.rs index 7fda6d7e..f6d9885e 100644 --- a/helix-core/src/match_brackets.rs +++ b/helix-core/src/match_brackets.rs @@ -106,12 +106,16 @@ fn find_pair( for close in iter::successors(node.next_sibling(), |node| node.next_sibling()).take(MATCH_LIMIT) { - let Some(open) = as_close_pair(doc, &close) else { continue; }; + let Some(open) = as_close_pair(doc, &close) else { + continue; + }; if find_pair_end(doc, Some(node), open, Backward).is_some() { return doc.try_byte_to_char(close.start_byte()).ok(); } } - let Some(parent) = node.parent() else { break; }; + let Some(parent) = node.parent() else { + break; + }; node = parent; } let node = tree.root_node().named_descendant_for_byte_range(pos, pos)?; diff --git a/helix-core/src/transaction.rs b/helix-core/src/transaction.rs index fec62578..1cea6911 100644 --- a/helix-core/src/transaction.rs +++ b/helix-core/src/transaction.rs @@ -389,7 +389,10 @@ impl ChangeSet { } let Some((i, change)) = iter.next() else { - map!(|pos, _| (old_pos == pos).then_some(new_pos), self.changes.len()); + map!( + |pos, _| (old_pos == pos).then_some(new_pos), + self.changes.len() + ); break; }; -- cgit v1.2.3-70-g09d2