mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 05:15:04 +00:00
Replace if let
with match
where appropriate
This commit is contained in:
parent
f29796da61
commit
9583dd5725
44 changed files with 201 additions and 269 deletions
|
@ -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))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue