Skip to content

Commit 907dabb

Browse files
committed
fix(clippy): Fix clippy lints on elided lifetimes
1 parent c2fdd11 commit 907dabb

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
@@ -1272,14 +1272,14 @@ impl Record {
12721272
/// }
12731273
/// assert_eq!(mod_count, 14);
12741274
/// ```
1275-
pub fn basemods_iter(&self) -> Result<BaseModificationsIter<'_>> {
1275+
pub fn basemods_iter(&'_ self) -> Result<BaseModificationsIter<'_>> {
12761276
BaseModificationsIter::new(self)
12771277
}
12781278

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

@@ -1658,7 +1658,7 @@ where
16581658
}
16591659

16601660
/// Returns an iterator over the array.
1661-
pub fn iter(&self) -> AuxArrayIter<'_, T> {
1661+
pub fn iter(&'_ self) -> AuxArrayIter<'_, T> {
16621662
AuxArrayIter {
16631663
index: 0,
16641664
array: self,

0 commit comments

Comments
 (0)