Skip to content

Commit e211ed9

Browse files
committed
fix(clippy): Fix clippy lints on elided lifetimes
1 parent 2ecf144 commit e211ed9

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

src/bam/buffer.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,12 +157,12 @@ impl RecordBuffer {
157157
}
158158

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

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

src/bam/header.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ impl Header {
106106
}
107107

108108
/// Returns an iterator of comment lines.
109-
pub fn comments(&self) -> impl Iterator<Item = Cow<str>> {
109+
pub fn comments(&'_ self) -> impl Iterator<Item = Cow<'_, str>> {
110110
self.records.iter().flat_map(|r| {
111111
r.split(|x| x == &b'\n')
112112
.filter(|x| x.starts_with(b"@CO\t"))

src/bam/record.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -833,7 +833,7 @@ impl Record {
833833
///
834834
/// When an error occurs, the `Err` variant will be returned
835835
/// and the iterator will not be able to advance anymore.
836-
pub fn aux_iter(&self) -> AuxIter {
836+
pub fn aux_iter(&'_ self) -> AuxIter<'_> {
837837
AuxIter {
838838
// In order to get to the aux data section of a `bam::Record`
839839
// we need to skip fields in front of it
@@ -1118,14 +1118,14 @@ impl Record {
11181118
/// }
11191119
/// assert_eq!(mod_count, 14);
11201120
/// ```
1121-
pub fn basemods_iter(&self) -> Result<BaseModificationsIter> {
1121+
pub fn basemods_iter(&'_ self) -> Result<BaseModificationsIter<'_>> {
11221122
BaseModificationsIter::new(self)
11231123
}
11241124

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

@@ -1504,7 +1504,7 @@ where
15041504
}
15051505

15061506
/// Returns an iterator over the array.
1507-
pub fn iter(&self) -> AuxArrayIter<T> {
1507+
pub fn iter(&'_ self) -> AuxArrayIter<'_, T> {
15081508
AuxArrayIter {
15091509
index: 0,
15101510
array: self,

0 commit comments

Comments
 (0)