Skip to content

Commit d7de774

Browse files
authored
Add explicit annotations for mismatched-lifetime-syntaxes lint (#1165)
1 parent 0c5a67f commit d7de774

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

code/crates/test/src/validator_set.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ impl ValidatorSet {
9191
}
9292

9393
/// Iterate over the validators in the set
94-
pub fn iter(&self) -> slice::Iter<Validator> {
94+
pub fn iter(&self) -> slice::Iter<'_, Validator> {
9595
self.validators.iter()
9696
}
9797

code/crates/wal/src/log.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ where
410410
/// * `Ok(Some(WalEntry))` - First entry exists and was retrieved
411411
/// * `Ok(None)` - WAL is empty
412412
/// * `Err` - If reading fails or WAL is invalid
413-
pub fn first_entry(&mut self) -> io::Result<Option<LogEntry<S>>> {
413+
pub fn first_entry(&mut self) -> io::Result<Option<LogEntry<'_, S>>> {
414414
// IF the file is empty, return an error
415415
if self.storage.size_bytes()? == 0 {
416416
return Err(io::Error::new(io::ErrorKind::NotFound, "Empty WAL"));
@@ -432,7 +432,7 @@ where
432432
/// # Returns
433433
/// * `Ok(LogIter)` - Iterator over WAL entries
434434
/// * `Err` - If reading fails
435-
pub fn iter(&mut self) -> io::Result<LogIter<S>> {
435+
pub fn iter(&mut self) -> io::Result<LogIter<'_, S>> {
436436
Ok(LogIter {
437437
next: self.first_entry()?,
438438
})

0 commit comments

Comments
 (0)