Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/tt/src/buffer.rs')
-rw-r--r--crates/tt/src/buffer.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/crates/tt/src/buffer.rs b/crates/tt/src/buffer.rs
index 3ce72fea85..1fa61c41dd 100644
--- a/crates/tt/src/buffer.rs
+++ b/crates/tt/src/buffer.rs
@@ -205,10 +205,9 @@ impl<'a> Cursor<'a> {
/// Bump the cursor
pub fn bump(self) -> Cursor<'a> {
if let Some(Entry::End(exit)) = self.buffer.entry(&self.ptr) {
- if let Some(exit) = exit {
- Cursor::create(self.buffer, *exit)
- } else {
- self
+ match exit {
+ Some(exit) => Cursor::create(self.buffer, *exit),
+ None => self,
}
} else {
Cursor::create(self.buffer, EntryPtr(self.ptr.0, self.ptr.1 + 1))