Skip to content

Commit 96ceb69

Browse files
committed
Clippy feedback
1 parent 897f85d commit 96ceb69

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

src/pagecache/iterator.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ fn check_contiguity_in_unstable_tail(
447447
};
448448

449449
// run the iterator to completion
450-
while let Some(_) = iter.next() {}
450+
for _ in &mut iter {}
451451

452452
// `cur_lsn` is set to the beginning
453453
// of the next message

src/pagecache/snapshot.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ fn advance_snapshot(
264264

265265
let old_stable_lsn = snapshot.stable_lsn;
266266

267-
while let Some((log_kind, pid, lsn, ptr)) = iter.next() {
267+
for (log_kind, pid, lsn, ptr) in &mut iter {
268268
trace!(
269269
"in advance_snapshot looking at item with pid {} lsn {} ptr {}",
270270
pid,

src/result.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ pub enum Error {
4949
}
5050

5151
impl Error {
52-
pub(crate) fn corruption(at: Option<DiskPtr>) -> Error {
52+
pub(crate) const fn corruption(at: Option<DiskPtr>) -> Error {
5353
Error::Corruption { at }
5454
}
5555
}

src/tree.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ const fn out_of_bounds(numba: usize) -> bool {
3838
}
3939

4040
#[cold]
41-
fn bounds_error() -> Result<()> {
41+
const fn bounds_error() -> Result<()> {
4242
Err(Error::Unsupported(
4343
"Keys and values are limited to \
4444
128gb on 64-bit platforms and

0 commit comments

Comments
 (0)