Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: allow leading deletions in read_pos method of CigarStringView. #447

Merged
merged 2 commits into from
Nov 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion src/bam/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@
/// # Arguments
///
/// * `start` - Optional starting virtual offset to seek to. Throws an error if it is not
/// a valid virtual offset.

Check warning on line 325 in src/bam/mod.rs

View workflow job for this annotation

GitHub Actions / clippy

doc list item without indentation

warning: doc list item without indentation --> src/bam/mod.rs:325:9 | 325 | /// a valid virtual offset. | ^ | = help: if this is supposed to be its own paragraph, add a blank line = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation = note: `#[warn(clippy::doc_lazy_continuation)]` on by default help: indent this line | 325 | /// a valid virtual offset. | ++
///
/// * `end` - Read until the virtual offset is less than `end`
pub fn iter_chunk(&mut self, start: Option<i64>, end: Option<i64>) -> ChunkIterator<'_, Self> {
Expand Down Expand Up @@ -1122,7 +1122,7 @@

//println!("{}", str::from_utf8(&header_string).unwrap());
let rec = htslib::sam_hdr_parse(
((l_text + 1) as usize).try_into().unwrap(),

Check warning on line 1125 in src/bam/mod.rs

View workflow job for this annotation

GitHub Actions / clippy

casting to the same type is unnecessary (`usize` -> `usize`)

warning: casting to the same type is unnecessary (`usize` -> `usize`) --> src/bam/mod.rs:1125:17 | 1125 | ((l_text + 1) as usize).try_into().unwrap(), | ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(l_text + 1)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

Check warning on line 1125 in src/bam/mod.rs

View workflow job for this annotation

GitHub Actions / clippy

useless conversion to the same type: `usize`

warning: useless conversion to the same type: `usize` --> src/bam/mod.rs:1125:17 | 1125 | ((l_text + 1) as usize).try_into().unwrap(), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: consider removing `.try_into()` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion = note: `#[warn(clippy::useless_conversion)]` on by default
text as *const c_char,
);

Expand Down Expand Up @@ -1288,7 +1288,7 @@
}
};

match self.reader.read(&mut record) {

Check warning on line 1291 in src/bam/mod.rs

View workflow job for this annotation

GitHub Actions / clippy

this expression creates a reference which is immediately dereferenced by the compiler

warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/bam/mod.rs:1291:32 | 1291 | match self.reader.read(&mut record) { | ^^^^^^^^^^^ help: change this to: `record` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow = note: `#[warn(clippy::needless_borrow)]` on by default
None => None,
Some(Ok(_)) => Some(Ok(Rc::clone(&self.record))),
Some(Err(err)) => Some(Err(err)),
Expand Down Expand Up @@ -1392,7 +1392,7 @@
header_string.len(),
);

let rec = htslib::sam_hdr_parse((l_text + 1), text as *const c_char);

Check warning on line 1395 in src/bam/mod.rs

View workflow job for this annotation

GitHub Actions / Testing-Features (no-default-features)

unnecessary parentheses around function argument

Check warning on line 1395 in src/bam/mod.rs

View workflow job for this annotation

GitHub Actions / Testing-Features (no-default-features)

unnecessary parentheses around function argument

Check warning on line 1395 in src/bam/mod.rs

View workflow job for this annotation

GitHub Actions / clippy

unnecessary parentheses around function argument

warning: unnecessary parentheses around function argument --> src/bam/mod.rs:1395:45 | 1395 | let rec = htslib::sam_hdr_parse((l_text + 1), text as *const c_char); | ^ ^ | = note: `#[warn(unused_parens)]` on by default help: remove these parentheses | 1395 - let rec = htslib::sam_hdr_parse((l_text + 1), text as *const c_char); 1395 + let rec = htslib::sam_hdr_parse(l_text + 1, text as *const c_char); |

Check warning on line 1395 in src/bam/mod.rs

View workflow job for this annotation

GitHub Actions / Testing-Features (all-features)

unnecessary parentheses around function argument

Check warning on line 1395 in src/bam/mod.rs

View workflow job for this annotation

GitHub Actions / Testing-Features (all-features)

unnecessary parentheses around function argument
(*rec).text = text as *mut c_char;
(*rec).l_text = l_text;
rec
Expand Down Expand Up @@ -2997,7 +2997,7 @@
fn test_bam_header_sync() {
let reader = Reader::from_path("test/test_issue_156_no_text.bam").unwrap();
let header_hashmap = Header::from_template(reader.header()).to_hashmap();
let header_refseqs = header_hashmap.get("SQ".into()).unwrap();
let header_refseqs = header_hashmap.get("SQ").unwrap();
assert_eq!(header_refseqs[0].get("SN").unwrap(), "ref_1",);
assert_eq!(header_refseqs[0].get("LN").unwrap(), "10000000",);
}
Expand Down
13 changes: 9 additions & 4 deletions src/bam/record.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
use std::rc::Rc;
use std::slice;
use std::str;
use std::u32;

Check warning on line 17 in src/bam/record.rs

View workflow job for this annotation

GitHub Actions / clippy

importing legacy numeric constants

warning: importing legacy numeric constants --> src/bam/record.rs:17:5 | 17 | use std::u32; | ^^^^^^^^ | = help: remove this import = note: then `u32::<CONST>` will resolve to the respective associated constant = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants

use byteorder::{LittleEndian, ReadBytesExt};

Expand Down Expand Up @@ -137,7 +137,7 @@
Record {
inner: {
#[allow(clippy::uninit_assumed_init)]
let mut inner = unsafe { MaybeUninit::uninit().assume_init() };

Check warning on line 140 in src/bam/record.rs

View workflow job for this annotation

GitHub Actions / Testing-Features (no-default-features)

the type `hts_sys::bam1_t` does not permit being left uninitialized

Check warning on line 140 in src/bam/record.rs

View workflow job for this annotation

GitHub Actions / clippy

the type `hts_sys::bam1_t` does not permit being left uninitialized

warning: the type `hts_sys::bam1_t` does not permit being left uninitialized --> src/bam/record.rs:140:42 | 140 | let mut inner = unsafe { MaybeUninit::uninit().assume_init() }; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | | | this code causes undefined behavior when executed | help: use `MaybeUninit<T>` instead, and only call `assume_init` after initialization is done | = note: integers must be initialized = note: `#[warn(invalid_value)]` on by default

Check warning on line 140 in src/bam/record.rs

View workflow job for this annotation

GitHub Actions / Testing-Features (all-features)

the type `hts_sys::bam1_t` does not permit being left uninitialized
unsafe {
::libc::memcpy(
&mut inner as *mut htslib::bam1_t as *mut ::libc::c_void,
Expand Down Expand Up @@ -811,7 +811,7 @@
ctag,
b'A' as c_char,
size_of::<u8>() as i32,
[v].as_mut_ptr() as *mut u8,

Check warning on line 814 in src/bam/record.rs

View workflow job for this annotation

GitHub Actions / clippy

casting raw pointers to the same type and constness is unnecessary (`*mut u8` -> `*mut u8`)

warning: casting raw pointers to the same type and constness is unnecessary (`*mut u8` -> `*mut u8`) --> src/bam/record.rs:814:21 | 814 | [v].as_mut_ptr() as *mut u8, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `[v].as_mut_ptr()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast = note: `#[warn(clippy::unnecessary_cast)]` on by default
),
Aux::I8(v) => htslib::bam_aux_append(
self.inner_ptr_mut(),
Expand All @@ -825,7 +825,7 @@
ctag,
b'C' as c_char,
size_of::<u8>() as i32,
[v].as_mut_ptr() as *mut u8,

Check warning on line 828 in src/bam/record.rs

View workflow job for this annotation

GitHub Actions / clippy

casting raw pointers to the same type and constness is unnecessary (`*mut u8` -> `*mut u8`)

warning: casting raw pointers to the same type and constness is unnecessary (`*mut u8` -> `*mut u8`) --> src/bam/record.rs:828:21 | 828 | [v].as_mut_ptr() as *mut u8, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `[v].as_mut_ptr()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
),
Aux::I16(v) => htslib::bam_aux_append(
self.inner_ptr_mut(),
Expand Down Expand Up @@ -1565,7 +1565,7 @@
self.aux = &self.aux[offset..];
(tag, aux)
})
.map_err(|e| {

Check warning on line 1568 in src/bam/record.rs

View workflow job for this annotation

GitHub Actions / clippy

using `map_err` over `inspect_err`

warning: using `map_err` over `inspect_err` --> src/bam/record.rs:1568:18 | 1568 | .map_err(|e| { | ^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_inspect = note: `#[warn(clippy::manual_inspect)]` on by default help: try | 1568 ~ .inspect_err(|e| { 1569 | // In the case of an error, we can not safely advance in the aux data, so we terminate the Iteration 1570 ~ self.aux = &[]; |
// In the case of an error, we can not safely advance in the aux data, so we terminate the Iteration
self.aux = &[];
e
Expand Down Expand Up @@ -1620,7 +1620,7 @@

/// Return encoded base. Complexity: O(1).
#[inline]
pub unsafe fn encoded_base_unchecked(&self, i: usize) -> u8 {

Check warning on line 1623 in src/bam/record.rs

View workflow job for this annotation

GitHub Actions / clippy

unsafe function's docs are missing a `# Safety` section

warning: unsafe function's docs are missing a `# Safety` section --> src/bam/record.rs:1623:5 | 1623 | pub unsafe fn encoded_base_unchecked(&self, i: usize) -> u8 { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc = note: `#[warn(clippy::missing_safety_doc)]` on by default
encoded_base_unchecked(self.encoded, i)
}

Expand All @@ -1628,7 +1628,7 @@
/// Use index based access seq()[i], for checked, safe access.
/// Complexity: O(1).
#[inline]
pub unsafe fn decoded_base_unchecked(&self, i: usize) -> u8 {

Check warning on line 1631 in src/bam/record.rs

View workflow job for this annotation

GitHub Actions / clippy

unsafe function's docs are missing a `# Safety` section

warning: unsafe function's docs are missing a `# Safety` section --> src/bam/record.rs:1631:5 | 1631 | pub unsafe fn decoded_base_unchecked(&self, i: usize) -> u8 { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc
*decode_base_unchecked(self.encoded_base_unchecked(i))
}

Expand Down Expand Up @@ -2097,10 +2097,15 @@
}
break;
},
Cigar::Del(_) => {
return Err(Error::BamUnexpectedCigarOperation {
msg: "'deletion' (D) found before any operation describing read sequence".to_owned()
});
Cigar::Del(l) => {
// METHOD: leading deletions can happen in case of trimmed reads where
// a primer has been removed AFTER read mapping.
// Example: 24M8I8D18M9S before trimming, 32H8D18M9S after trimming
// with fgbio. While leading deletions should be impossible with
// normal read mapping, they make perfect sense with primer trimming
// because the mapper still had the evidence to decide in favor of
// the deletion via the primer sequence.
rpos += l;
},
Cigar::RefSkip(_) => {
return Err(Error::BamUnexpectedCigarOperation {
Expand Down Expand Up @@ -2245,7 +2250,7 @@
/// This function allocates memory for the state structure
/// and initializes the iterator to the start of the modification
/// records.
fn new<'a>(r: &'a Record) -> Result<BaseModificationState<'a>> {

Check warning on line 2253 in src/bam/record.rs

View workflow job for this annotation

GitHub Actions / clippy

the following explicit lifetimes could be elided: 'a

warning: the following explicit lifetimes could be elided: 'a --> src/bam/record.rs:2253:12 | 2253 | fn new<'a>(r: &'a Record) -> Result<BaseModificationState<'a>> { | ^^ ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes = note: `#[warn(clippy::needless_lifetimes)]` on by default help: elide the lifetimes | 2253 - fn new<'a>(r: &'a Record) -> Result<BaseModificationState<'a>> { 2253 + fn new(r: &Record) -> Result<BaseModificationState<'_>> { |
let mut bm = unsafe {
BaseModificationState {
record: r,
Expand All @@ -2269,7 +2274,7 @@

let types = bm.recorded();
bm.buffer.reserve(types.len());
return Ok(bm);

Check warning on line 2277 in src/bam/record.rs

View workflow job for this annotation

GitHub Actions / clippy

unneeded `return` statement

warning: unneeded `return` statement --> src/bam/record.rs:2277:9 | 2277 | return Ok(bm); | ^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return = note: `#[warn(clippy::needless_return)]` on by default help: remove `return` | 2277 - return Ok(bm); 2277 + Ok(bm) |
}

pub fn buffer_next_mods(&mut self) -> Result<usize> {
Expand Down Expand Up @@ -2297,7 +2302,7 @@
// not update the length so needs to be manually set
self.buffer.set_len(ret as usize);

return Ok(ret as usize);

Check warning on line 2305 in src/bam/record.rs

View workflow job for this annotation

GitHub Actions / clippy

unneeded `return` statement

warning: unneeded `return` statement --> src/bam/record.rs:2305:13 | 2305 | return Ok(ret as usize); | ^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return help: remove `return` | 2305 - return Ok(ret as usize); 2305 + Ok(ret as usize) |
}
}

Expand All @@ -2322,7 +2327,7 @@
/// and the ascii code for the canonical base.
/// If there are multiple modifications with the same code this will return the data
/// for the first mod. See https://github.com/samtools/htslib/issues/1635
pub fn query_type<'a>(&self, code: i32) -> Result<BaseModificationMetadata> {

Check warning on line 2330 in src/bam/record.rs

View workflow job for this annotation

GitHub Actions / clippy

this lifetime isn't used in the function definition

warning: this lifetime isn't used in the function definition --> src/bam/record.rs:2330:23 | 2330 | pub fn query_type<'a>(&self, code: i32) -> Result<BaseModificationMetadata> { | ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes = note: `#[warn(clippy::extra_unused_lifetimes)]` on by default
unsafe {
let mut strand: i32 = 0;
let mut implicit: i32 = 0;
Expand All @@ -2337,13 +2342,13 @@
&mut canonical,
);
if ret == -1 {
return Err(Error::BamBaseModificationTypeNotFound);

Check warning on line 2345 in src/bam/record.rs

View workflow job for this annotation

GitHub Actions / clippy

unneeded `return` statement

warning: unneeded `return` statement --> src/bam/record.rs:2345:17 | 2345 | return Err(Error::BamBaseModificationTypeNotFound); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return help: remove `return` | 2345 - return Err(Error::BamBaseModificationTypeNotFound); 2345 + Err(Error::BamBaseModificationTypeNotFound) |
} else {
return Ok(BaseModificationMetadata {
strand,
implicit,
canonical: canonical.try_into().unwrap(),
});

Check warning on line 2351 in src/bam/record.rs

View workflow job for this annotation

GitHub Actions / clippy

unneeded `return` statement

warning: unneeded `return` statement --> src/bam/record.rs:2347:17 | 2347 | / return Ok(BaseModificationMetadata { 2348 | | strand, 2349 | | implicit, 2350 | | canonical: canonical.try_into().unwrap(), 2351 | | }); | |__________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return help: remove `return` | 2347 ~ Ok(BaseModificationMetadata { 2348 + strand, 2349 + implicit, 2350 + canonical: canonical.try_into().unwrap(), 2351 ~ }) |
}
}
}
Expand All @@ -2364,7 +2369,7 @@
}

impl BaseModificationsPositionIter<'_> {
fn new<'a>(r: &'a Record) -> Result<BaseModificationsPositionIter<'a>> {

Check warning on line 2372 in src/bam/record.rs

View workflow job for this annotation

GitHub Actions / clippy

the following explicit lifetimes could be elided: 'a

warning: the following explicit lifetimes could be elided: 'a --> src/bam/record.rs:2372:12 | 2372 | fn new<'a>(r: &'a Record) -> Result<BaseModificationsPositionIter<'a>> { | ^^ ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 2372 - fn new<'a>(r: &'a Record) -> Result<BaseModificationsPositionIter<'a>> { 2372 + fn new(r: &Record) -> Result<BaseModificationsPositionIter<'_>> { |
let state = BaseModificationState::new(r)?;
Ok(BaseModificationsPositionIter { mod_state: state })
}
Expand All @@ -2373,8 +2378,8 @@
return self.mod_state.recorded();
}

pub fn query_type<'a>(&self, code: i32) -> Result<BaseModificationMetadata> {

Check warning on line 2381 in src/bam/record.rs

View workflow job for this annotation

GitHub Actions / clippy

this lifetime isn't used in the function definition

warning: this lifetime isn't used in the function definition --> src/bam/record.rs:2381:23 | 2381 | pub fn query_type<'a>(&self, code: i32) -> Result<BaseModificationMetadata> { | ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes
return self.mod_state.query_type(code);

Check warning on line 2382 in src/bam/record.rs

View workflow job for this annotation

GitHub Actions / clippy

unneeded `return` statement

warning: unneeded `return` statement --> src/bam/record.rs:2382:9 | 2382 | return self.mod_state.query_type(code); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return help: remove `return` | 2382 - return self.mod_state.query_type(code); 2382 + self.mod_state.query_type(code) |
}
}

Expand All @@ -2391,13 +2396,13 @@
match ret {
Ok(num_mods) => {
if num_mods == 0 {
return None;

Check warning on line 2399 in src/bam/record.rs

View workflow job for this annotation

GitHub Actions / clippy

unneeded `return` statement

warning: unneeded `return` statement --> src/bam/record.rs:2399:21 | 2399 | return None; | ^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return help: remove `return` | 2399 - return None; 2399 + None |
} else {
let data = (self.mod_state.buffer_pos, self.mod_state.buffer.clone());
return Some(Ok(data));

Check warning on line 2402 in src/bam/record.rs

View workflow job for this annotation

GitHub Actions / clippy

unneeded `return` statement

warning: unneeded `return` statement --> src/bam/record.rs:2402:21 | 2402 | return Some(Ok(data)); | ^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return help: remove `return` | 2402 - return Some(Ok(data)); 2402 + Some(Ok(data)) |
}
}
Err(e) => return Some(Err(e)),

Check warning on line 2405 in src/bam/record.rs

View workflow job for this annotation

GitHub Actions / clippy

unneeded `return` statement

warning: unneeded `return` statement --> src/bam/record.rs:2405:23 | 2405 | Err(e) => return Some(Err(e)), | ^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return help: remove `return` | 2405 | Err(e) => Some(Err(e)), | ~~~~~~~~~~~~
}
}
}
Expand All @@ -2410,7 +2415,7 @@
}

impl BaseModificationsIter<'_> {
fn new<'a>(r: &'a Record) -> Result<BaseModificationsIter<'a>> {

Check warning on line 2418 in src/bam/record.rs

View workflow job for this annotation

GitHub Actions / clippy

the following explicit lifetimes could be elided: 'a

warning: the following explicit lifetimes could be elided: 'a --> src/bam/record.rs:2418:12 | 2418 | fn new<'a>(r: &'a Record) -> Result<BaseModificationsIter<'a>> { | ^^ ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 2418 - fn new<'a>(r: &'a Record) -> Result<BaseModificationsIter<'a>> { 2418 + fn new(r: &Record) -> Result<BaseModificationsIter<'_>> { |
let state = BaseModificationState::new(r)?;
Ok(BaseModificationsIter {
mod_state: state,
Expand All @@ -2422,8 +2427,8 @@
return self.mod_state.recorded();
}

pub fn query_type<'a>(&self, code: i32) -> Result<BaseModificationMetadata> {

Check warning on line 2430 in src/bam/record.rs

View workflow job for this annotation

GitHub Actions / clippy

this lifetime isn't used in the function definition

warning: this lifetime isn't used in the function definition --> src/bam/record.rs:2430:23 | 2430 | pub fn query_type<'a>(&self, code: i32) -> Result<BaseModificationMetadata> { | ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes
return self.mod_state.query_type(code);

Check warning on line 2431 in src/bam/record.rs

View workflow job for this annotation

GitHub Actions / clippy

unneeded `return` statement

warning: unneeded `return` statement --> src/bam/record.rs:2431:9 | 2431 | return self.mod_state.query_type(code); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return help: remove `return` | 2431 - return self.mod_state.query_type(code); 2431 + self.mod_state.query_type(code) |
}
}

Expand Down Expand Up @@ -2457,7 +2462,7 @@
self.mod_state.buffer[self.buffer_idx],
);
self.buffer_idx += 1;
return Some(Ok(data));

Check warning on line 2465 in src/bam/record.rs

View workflow job for this annotation

GitHub Actions / clippy

unneeded `return` statement

warning: unneeded `return` statement --> src/bam/record.rs:2465:9 | 2465 | return Some(Ok(data)); | ^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return help: remove `return` | 2465 - return Some(Ok(data)); 2465 + Some(Ok(data)) |
}
}

Expand Down
Loading