Skip to content
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix(clippy): Fix clippy lints on elided lifetimes
  • Loading branch information
jeeeesper committed Sep 18, 2025
commit e211ed970f7f69c97444f2504b70a278f849ecbe
4 changes: 2 additions & 2 deletions src/bam/buffer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,12 +157,12 @@ impl RecordBuffer {
}

/// Iterate over records that have been fetched with `fetch`.
pub fn iter(&self) -> vec_deque::Iter<Rc<bam::Record>> {
pub fn iter(&'_ self) -> vec_deque::Iter<'_, Rc<bam::Record>> {
self.inner.iter()
}

/// Iterate over mutable references to records that have been fetched with `fetch`.
pub fn iter_mut(&mut self) -> vec_deque::IterMut<Rc<bam::Record>> {
pub fn iter_mut(&'_ mut self) -> vec_deque::IterMut<'_, Rc<bam::Record>> {
self.inner.iter_mut()
}

Expand Down
2 changes: 1 addition & 1 deletion src/bam/header.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ impl Header {
}

/// Returns an iterator of comment lines.
pub fn comments(&self) -> impl Iterator<Item = Cow<str>> {
pub fn comments(&'_ self) -> impl Iterator<Item = Cow<'_, str>> {
self.records.iter().flat_map(|r| {
r.split(|x| x == &b'\n')
.filter(|x| x.starts_with(b"@CO\t"))
Expand Down
8 changes: 4 additions & 4 deletions src/bam/record.rs
Original file line number Diff line number Diff line change
Expand Up @@ -833,7 +833,7 @@ impl Record {
///
/// When an error occurs, the `Err` variant will be returned
/// and the iterator will not be able to advance anymore.
pub fn aux_iter(&self) -> AuxIter {
pub fn aux_iter(&'_ self) -> AuxIter<'_> {
AuxIter {
// In order to get to the aux data section of a `bam::Record`
// we need to skip fields in front of it
Expand Down Expand Up @@ -1118,14 +1118,14 @@ impl Record {
/// }
/// assert_eq!(mod_count, 14);
/// ```
pub fn basemods_iter(&self) -> Result<BaseModificationsIter> {
pub fn basemods_iter(&'_ self) -> Result<BaseModificationsIter<'_>> {
BaseModificationsIter::new(self)
}

/// An iterator that returns all of the modifications for each position as a vector.
/// This is useful for the case where multiple possible modifications can be annotated
/// at a single position (for example a C could be 5-mC or 5-hmC)
pub fn basemods_position_iter(&self) -> Result<BaseModificationsPositionIter> {
pub fn basemods_position_iter(&'_ self) -> Result<BaseModificationsPositionIter<'_>> {
BaseModificationsPositionIter::new(self)
}

Expand Down Expand Up @@ -1504,7 +1504,7 @@ where
}

/// Returns an iterator over the array.
pub fn iter(&self) -> AuxArrayIter<T> {
pub fn iter(&'_ self) -> AuxArrayIter<'_, T> {
AuxArrayIter {
index: 0,
array: self,
Expand Down
Loading