aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_tt/src/buffer.rs
diff options
context:
space:
mode:
authorVeetaha <[email protected]>2020-06-28 02:02:03 +0100
committerVeetaha <[email protected]>2020-06-28 02:03:59 +0100
commite75e2ae5b6b6b1364368ceb3d4081b6508b2f001 (patch)
treee88a9920a908bfdf66c156ab582ce90d77d55c2f /crates/ra_tt/src/buffer.rs
parent513924a7e01ef81a03869249c902daf148439736 (diff)
Simlify with matches!()
Diffstat (limited to 'crates/ra_tt/src/buffer.rs')
-rw-r--r--crates/ra_tt/src/buffer.rs5
1 files changed, 1 insertions, 4 deletions
diff --git a/crates/ra_tt/src/buffer.rs b/crates/ra_tt/src/buffer.rs
index 5967f44cd..02c771f70 100644
--- a/crates/ra_tt/src/buffer.rs
+++ b/crates/ra_tt/src/buffer.rs
@@ -105,10 +105,7 @@ impl<'a> Eq for Cursor<'a> {}
105impl<'a> Cursor<'a> { 105impl<'a> Cursor<'a> {
106 /// Check whether it is eof 106 /// Check whether it is eof
107 pub fn eof(self) -> bool { 107 pub fn eof(self) -> bool {
108 match self.buffer.entry(&self.ptr) { 108 matches!(self.buffer.entry(&self.ptr), None | Some(Entry::End(None)))
109 None | Some(Entry::End(None)) => true,
110 _ => false,
111 }
112 } 109 }
113 110
114 /// If the cursor is pointing at the end of a subtree, returns 111 /// If the cursor is pointing at the end of a subtree, returns