mirror of
https://github.com/neondatabase/neon.git
synced 2026-05-26 09:30:37 +00:00
clippy cleanup #2
- remove needless return - remove needless format! - remove a few more needless clone() - from_str_radix(_, 10) -> .parse() - remove needless reference - remove needless `mut` Also manually replaced a match statement with map_err() because after clippy was done with it, there was almost nothing left in the match expression.
This commit is contained in:
@@ -154,7 +154,7 @@ pub fn get_or_restore_pagecache(
|
||||
})
|
||||
.unwrap();
|
||||
|
||||
return Ok(result);
|
||||
Ok(result)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -412,7 +412,7 @@ impl PageCache {
|
||||
tag.blknum
|
||||
);
|
||||
|
||||
return Ok(page_img);
|
||||
Ok(page_img)
|
||||
}
|
||||
|
||||
//
|
||||
@@ -467,7 +467,7 @@ impl PageCache {
|
||||
}
|
||||
|
||||
records.reverse();
|
||||
return (base_img, records);
|
||||
(base_img, records)
|
||||
}
|
||||
|
||||
//
|
||||
@@ -610,7 +610,7 @@ impl PageCache {
|
||||
pub fn get_last_valid_lsn(&self) -> u64 {
|
||||
let shared = self.shared.lock().unwrap();
|
||||
|
||||
return shared.last_record_lsn;
|
||||
shared.last_record_lsn
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user