Replace if let with match where appropriate
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user