chore(master): release 0.49.0 (#458) #128
Annotations
94 warnings
the type `hts_sys::bam1_t` does not permit being left uninitialized:
src/bam/record.rs#L140
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
|
usage of an `Arc` that is not `Send` and `Sync`:
src/tpool.rs#L33
warning: usage of an `Arc` that is not `Send` and `Sync`
--> src/tpool.rs:33:26
|
33 | let handle = Arc::new(RefCell::new(inner));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `Arc<RefCell<InnerThreadPool>>` is not `Send` and `Sync` as `RefCell<InnerThreadPool>` is neither `Send` nor `Sync`
= help: if the `Arc` will not used be across threads replace it with an `Rc`
= help: otherwise make `RefCell<InnerThreadPool>` `Send` and `Sync` or consider a wrapper type such as `Mutex`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync
= note: `#[warn(clippy::arc_with_non_send_sync)]` on by default
|
the following explicit lifetimes could be elided: 'a:
src/tbx/mod.rs#L330
warning: the following explicit lifetimes could be elided: 'a
--> src/tbx/mod.rs:330:6
|
330 | impl<'a, R: Read> Iterator for Records<'a, R> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
330 - impl<'a, R: Read> Iterator for Records<'a, R> {
330 + impl<R: Read> Iterator for Records<'_, R> {
|
|
usage of a legacy numeric constant:
src/faidx/mod.rs#L92
warning: usage of a legacy numeric constant
--> src/faidx/mod.rs:92:18
|
92 | if end > std::i64::MAX as usize {
| ^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
help: use the associated constant instead
|
92 | if end > i64::MAX as usize {
| ~~~~~~~~
|
usage of a legacy numeric constant:
src/faidx/mod.rs#L89
warning: usage of a legacy numeric constant
--> src/faidx/mod.rs:89:20
|
89 | if begin > std::i64::MAX as usize {
| ^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
help: use the associated constant instead
|
89 | if begin > i64::MAX as usize {
| ~~~~~~~~
|
unneeded `return` statement:
src/bgzf/mod.rs#L243
warning: unneeded `return` statement
--> src/bgzf/mod.rs:243:9
|
243 | return Ok(ffi::CString::new(write_string).unwrap());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
243 - return Ok(ffi::CString::new(write_string).unwrap());
243 + Ok(ffi::CString::new(write_string).unwrap())
|
|
comparing with null is better expressed by the `.is_null()` method:
src/bgzf/mod.rs#L220
warning: comparing with null is better expressed by the `.is_null()` method
--> src/bgzf/mod.rs:220:12
|
220 | if inner != std::ptr::null_mut() {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_null
|
comparing with null is better expressed by the `.is_null()` method:
src/bgzf/mod.rs#L90
warning: comparing with null is better expressed by the `.is_null()` method
--> src/bgzf/mod.rs:90:12
|
90 | if inner != std::ptr::null_mut() {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_null
= note: `#[warn(clippy::cmp_null)]` on by default
|
the following explicit lifetimes could be elided: 'a:
src/bcf/mod.rs#L799
warning: the following explicit lifetimes could be elided: 'a
--> src/bcf/mod.rs:799:6
|
799 | impl<'a, R: Read> Iterator for Records<'a, R> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
799 - impl<'a, R: Read> Iterator for Records<'a, R> {
799 + impl<R: Read> Iterator for Records<'_, R> {
|
|
doc list item without indentation:
src/bcf/mod.rs#L324
warning: doc list item without indentation
--> src/bcf/mod.rs:324:9
|
324 | /// is given, records are fetched from `start` until the end of the contig.
| ^
|
= 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
help: indent this line
|
324 | /// is given, records are fetched from `start` until the end of the contig.
| ++
|
the following explicit lifetimes could be elided: 'a:
src/bcf/record.rs#L1557
warning: the following explicit lifetimes could be elided: 'a
--> src/bcf/record.rs:1557:6
|
1557 | impl<'a> Iterator for Filters<'a> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
1557 - impl<'a> Iterator for Filters<'a> {
1557 + impl Iterator for Filters<'_> {
|
|
the following explicit lifetimes could be elided: 'a, 'b:
src/bcf/record.rs#L1541
warning: the following explicit lifetimes could be elided: 'a, 'b
--> src/bcf/record.rs:1541:13
|
1541 | unsafe impl<'a, 'b, B: BorrowMut<Buffer> + Borrow<Buffer> + 'b> Sync for Format<'a, B> {}
| ^^ ^^ ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
1541 - unsafe impl<'a, 'b, B: BorrowMut<Buffer> + Borrow<Buffer> + 'b> Sync for Format<'a, B> {}
1541 + unsafe impl<B: BorrowMut<Buffer> + Borrow<Buffer> + '_> Sync for Format<'_, B> {}
|
|
this lifetime isn't used in the impl:
src/bcf/record.rs#L1541
warning: this lifetime isn't used in the impl
--> src/bcf/record.rs:1541:17
|
1541 | unsafe impl<'a, 'b, B: BorrowMut<Buffer> + Borrow<Buffer> + 'b> Sync for Format<'a, B> {}
| ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes
|
the following explicit lifetimes could be elided: 'a, 'b:
src/bcf/record.rs#L1539
warning: the following explicit lifetimes could be elided: 'a, 'b
--> src/bcf/record.rs:1539:13
|
1539 | unsafe impl<'a, 'b, B: BorrowMut<Buffer> + Borrow<Buffer> + 'b> Send for Format<'a, B> {}
| ^^ ^^ ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
1539 - unsafe impl<'a, 'b, B: BorrowMut<Buffer> + Borrow<Buffer> + 'b> Send for Format<'a, B> {}
1539 + unsafe impl<B: BorrowMut<Buffer> + Borrow<Buffer> + '_> Send for Format<'_, B> {}
|
|
this lifetime isn't used in the impl:
src/bcf/record.rs#L1539
warning: this lifetime isn't used in the impl
--> src/bcf/record.rs:1539:17
|
1539 | unsafe impl<'a, 'b, B: BorrowMut<Buffer> + Borrow<Buffer> + 'b> Send for Format<'a, B> {}
| ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes
|
redundant closure:
src/bcf/record.rs#L1503
warning: redundant closure
--> src/bcf/record.rs:1503:22
|
1503 | .map(|s| trim_slice(s))
| ^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `trim_slice`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure
|
redundant closure:
src/bcf/record.rs#L1480
warning: redundant closure
--> src/bcf/record.rs:1480:22
|
1480 | .map(|s| trim_slice(s))
| ^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `trim_slice`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure
= note: `#[warn(clippy::redundant_closure)]` on by default
|
the following explicit lifetimes could be elided: 'a, 'b:
src/bcf/record.rs#L1385
warning: the following explicit lifetimes could be elided: 'a, 'b
--> src/bcf/record.rs:1385:13
|
1385 | unsafe impl<'a, 'b, B: BorrowMut<Buffer> + Borrow<Buffer> + 'b> Sync for Info<'a, B> {}
| ^^ ^^ ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
1385 - unsafe impl<'a, 'b, B: BorrowMut<Buffer> + Borrow<Buffer> + 'b> Sync for Info<'a, B> {}
1385 + unsafe impl<B: BorrowMut<Buffer> + Borrow<Buffer> + '_> Sync for Info<'_, B> {}
|
|
this lifetime isn't used in the impl:
src/bcf/record.rs#L1385
warning: this lifetime isn't used in the impl
--> src/bcf/record.rs:1385:17
|
1385 | unsafe impl<'a, 'b, B: BorrowMut<Buffer> + Borrow<Buffer> + 'b> Sync for Info<'a, B> {}
| ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes
|
the following explicit lifetimes could be elided: 'a, 'b:
src/bcf/record.rs#L1383
warning: the following explicit lifetimes could be elided: 'a, 'b
--> src/bcf/record.rs:1383:13
|
1383 | unsafe impl<'a, 'b, B: BorrowMut<Buffer> + Borrow<Buffer> + 'b> Send for Info<'a, B> {}
| ^^ ^^ ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
1383 - unsafe impl<'a, 'b, B: BorrowMut<Buffer> + Borrow<Buffer> + 'b> Send for Info<'a, B> {}
1383 + unsafe impl<B: BorrowMut<Buffer> + Borrow<Buffer> + '_> Send for Info<'_, B> {}
|
|
this lifetime isn't used in the impl:
src/bcf/record.rs#L1383
warning: this lifetime isn't used in the impl
--> src/bcf/record.rs:1383:17
|
1383 | unsafe impl<'a, 'b, B: BorrowMut<Buffer> + Borrow<Buffer> + 'b> Send for Info<'a, B> {}
| ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes
|
very complex type used. Consider factoring parts into `type` definitions:
src/bcf/record.rs#L1361
warning: very complex type used. Consider factoring parts into `type` definitions
--> src/bcf/record.rs:1361:32
|
1361 | pub fn string(mut self) -> Result<Option<BufferBacked<'b, Vec<&'b [u8]>, B>>> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity
= note: `#[warn(clippy::type_complexity)]` on by default
|
the following explicit lifetimes could be elided: 'a:
src/bcf/record.rs#L1280
warning: the following explicit lifetimes could be elided: 'a
--> src/bcf/record.rs:1280:6
|
1280 | impl<'a, 'b, B: BorrowMut<Buffer> + Borrow<Buffer> + 'b> Info<'a, B> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
1280 - impl<'a, 'b, B: BorrowMut<Buffer> + Borrow<Buffer> + 'b> Info<'a, B> {
1280 + impl<'b, B: BorrowMut<Buffer> + Borrow<Buffer> + 'b> Info<'_, B> {
|
|
dereferencing a tuple pattern where every element takes a reference:
src/bcf/record.rs#L1228
warning: dereferencing a tuple pattern where every element takes a reference
--> src/bcf/record.rs:1228:13
|
1228 | let &Genotype(ref alleles) = self;
| ^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference
= note: `#[warn(clippy::needless_borrowed_reference)]` on by default
help: try removing the `&` and `ref` parts
|
1228 - let &Genotype(ref alleles) = self;
1228 + let Genotype(alleles) = self;
|
|
returning the result of a `let` binding from a block:
src/bcf/record.rs#L1129
warning: returning the result of a `let` binding from a block
--> src/bcf/record.rs:1129:13
|
1128 | let inner = htslib::bcf_dup(self.inner);
| ---------------------------------------- unnecessary `let` binding
1129 | inner
| ^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return
= note: `#[warn(clippy::let_and_return)]` on by default
help: return the expression directly
|
1128 ~
1129 ~ htslib::bcf_dup(self.inner)
|
|
casting raw pointers to the same type and constness is unnecessary (`*mut libc::c_void` -> `*mut libc::c_void`):
src/bcf/record.rs#L126
warning: casting raw pointers to the same type and constness is unnecessary (`*mut libc::c_void` -> `*mut libc::c_void`)
--> src/bcf/record.rs:126:26
|
126 | ::libc::free(self.inner as *mut ::libc::c_void);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.inner`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
|
you should consider adding a `Default` implementation for `Buffer`:
src/bcf/record.rs#L115
warning: you should consider adding a `Default` implementation for `Buffer`
--> src/bcf/record.rs:115:5
|
115 | / pub fn new() -> Self {
116 | | Buffer {
117 | | inner: ptr::null_mut(),
118 | | len: 0,
119 | | }
120 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
= note: `#[warn(clippy::new_without_default)]` on by default
help: try adding this
|
114 + impl Default for Buffer {
115 + fn default() -> Self {
116 + Self::new()
117 + }
118 + }
|
|
importing legacy numeric constants:
src/bcf/record.rs#L10
warning: importing legacy numeric constants
--> src/bcf/record.rs:10:5
|
10 | use std::i32;
| ^^^^^^^^
|
= help: remove this import
= note: then `i32::<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
|
casting raw pointers to the same type and constness is unnecessary (`*mut i32` -> `*mut i32`):
src/bcf/header.rs#L121
warning: casting raw pointers to the same type and constness is unnecessary (`*mut i32` -> `*mut i32`)
--> src/bcf/header.rs:121:17
|
121 | imap.as_mut_ptr() as *mut i32,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `imap.as_mut_ptr()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
|
casting raw pointers to the same type and constness is unnecessary (`*const *mut i8` -> `*const *mut i8`):
src/bcf/header.rs#L120
warning: casting raw pointers to the same type and constness is unnecessary (`*const *mut i8` -> `*const *mut i8`)
--> src/bcf/header.rs:120:17
|
120 | name_pointers.as_ptr() as *const *mut c_char,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `name_pointers.as_ptr()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
|
the following explicit lifetimes could be elided: 'a:
src/bam/mod.rs#L1305
warning: the following explicit lifetimes could be elided: 'a
--> src/bam/mod.rs:1305:6
|
1305 | impl<'a, R: Read> Iterator for ChunkIterator<'a, R> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
1305 - impl<'a, R: Read> Iterator for ChunkIterator<'a, R> {
1305 + impl<R: Read> Iterator for ChunkIterator<'_, R> {
|
|
this expression creates a reference which is immediately dereferenced by the compiler:
src/bam/mod.rs#L1291
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
|
the following explicit lifetimes could be elided: 'a:
src/bam/mod.rs#L1278
warning: the following explicit lifetimes could be elided: 'a
--> src/bam/mod.rs:1278:6
|
1278 | impl<'a, R: Read> Iterator for RcRecords<'a, R> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
1278 - impl<'a, R: Read> Iterator for RcRecords<'a, R> {
1278 + impl<R: Read> Iterator for RcRecords<'_, R> {
|
|
the following explicit lifetimes could be elided: 'a:
src/bam/mod.rs#L1256
warning: the following explicit lifetimes could be elided: 'a
--> src/bam/mod.rs:1256:6
|
1256 | impl<'a, R: Read> Iterator for Records<'a, R> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
1256 - impl<'a, R: Read> Iterator for Records<'a, R> {
1256 + impl<R: Read> Iterator for Records<'_, R> {
|
|
casting to the same type is unnecessary (`usize` -> `usize`):
src/bam/mod.rs#L1125
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
|
useless conversion to the same type: `usize`:
src/bam/mod.rs#L1125
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
|
doc list item without indentation:
src/bam/mod.rs#L325
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.
| ++
|
unneeded `return` statement:
src/bam/record.rs#L2471
warning: unneeded `return` statement
--> src/bam/record.rs:2471:9
|
2471 | return Some(Ok(data));
| ^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
2471 - return Some(Ok(data));
2471 + Some(Ok(data))
|
|
the following explicit lifetimes could be elided: 'a:
src/bam/record.rs#L2441
warning: the following explicit lifetimes could be elided: 'a
--> src/bam/record.rs:2441:6
|
2441 | impl<'a> Iterator for BaseModificationsIter<'a> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
2441 - impl<'a> Iterator for BaseModificationsIter<'a> {
2441 + impl Iterator for BaseModificationsIter<'_> {
|
|
unneeded `return` statement:
src/bam/record.rs#L2437
warning: unneeded `return` statement
--> src/bam/record.rs:2437:9
|
2437 | 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`
|
2437 - return self.mod_state.query_type(code);
2437 + self.mod_state.query_type(code)
|
|
this lifetime isn't used in the function definition:
src/bam/record.rs#L2436
warning: this lifetime isn't used in the function definition
--> src/bam/record.rs:2436:23
|
2436 | 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
|
unneeded `return` statement:
src/bam/record.rs#L2433
warning: unneeded `return` statement
--> src/bam/record.rs:2433:9
|
2433 | return self.mod_state.recorded();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
2433 - return self.mod_state.recorded();
2433 + self.mod_state.recorded()
|
|
the following explicit lifetimes could be elided: 'a:
src/bam/record.rs#L2424
warning: the following explicit lifetimes could be elided: 'a
--> src/bam/record.rs:2424:12
|
2424 | 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
|
2424 - fn new<'a>(r: &'a Record) -> Result<BaseModificationsIter<'a>> {
2424 + fn new(r: &Record) -> Result<BaseModificationsIter<'_>> {
|
|
unneeded `return` statement:
src/bam/record.rs#L2411
warning: unneeded `return` statement
--> src/bam/record.rs:2411:23
|
2411 | 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`
|
2411 | Err(e) => Some(Err(e)),
| ~~~~~~~~~~~~
|
unneeded `return` statement:
src/bam/record.rs#L2408
warning: unneeded `return` statement
--> src/bam/record.rs:2408:21
|
2408 | return Some(Ok(data));
| ^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
2408 - return Some(Ok(data));
2408 + Some(Ok(data))
|
|
unneeded `return` statement:
src/bam/record.rs#L2405
warning: unneeded `return` statement
--> src/bam/record.rs:2405:21
|
2405 | return None;
| ^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
2405 - return None;
2405 + None
|
|
the following explicit lifetimes could be elided: 'a:
src/bam/record.rs#L2392
warning: the following explicit lifetimes could be elided: 'a
--> src/bam/record.rs:2392:6
|
2392 | impl<'a> Iterator for BaseModificationsPositionIter<'a> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
2392 - impl<'a> Iterator for BaseModificationsPositionIter<'a> {
2392 + impl Iterator for BaseModificationsPositionIter<'_> {
|
|
unneeded `return` statement:
src/bam/record.rs#L2388
warning: unneeded `return` statement
--> src/bam/record.rs:2388:9
|
2388 | 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`
|
2388 - return self.mod_state.query_type(code);
2388 + self.mod_state.query_type(code)
|
|
this lifetime isn't used in the function definition:
src/bam/record.rs#L2387
warning: this lifetime isn't used in the function definition
--> src/bam/record.rs:2387:23
|
2387 | 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
|
unneeded `return` statement:
src/bam/record.rs#L2384
warning: unneeded `return` statement
--> src/bam/record.rs:2384:9
|
2384 | return self.mod_state.recorded();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
2384 - return self.mod_state.recorded();
2384 + self.mod_state.recorded()
|
|
the following explicit lifetimes could be elided: 'a:
src/bam/record.rs#L2378
warning: the following explicit lifetimes could be elided: 'a
--> src/bam/record.rs:2378:12
|
2378 | 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
|
2378 - fn new<'a>(r: &'a Record) -> Result<BaseModificationsPositionIter<'a>> {
2378 + fn new(r: &Record) -> Result<BaseModificationsPositionIter<'_>> {
|
|
unneeded `return` statement:
src/bam/record.rs#L2353
warning: unneeded `return` statement
--> src/bam/record.rs:2353:17
|
2353 | / return Ok(BaseModificationMetadata {
2354 | | strand,
2355 | | implicit,
2356 | | canonical: canonical.try_into().unwrap(),
2357 | | });
| |__________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
2353 ~ Ok(BaseModificationMetadata {
2354 + strand,
2355 + implicit,
2356 + canonical: canonical.try_into().unwrap(),
2357 ~ })
|
|
unneeded `return` statement:
src/bam/record.rs#L2351
warning: unneeded `return` statement
--> src/bam/record.rs:2351:17
|
2351 | return Err(Error::BamBaseModificationTypeNotFound);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
2351 - return Err(Error::BamBaseModificationTypeNotFound);
2351 + Err(Error::BamBaseModificationTypeNotFound)
|
|
this lifetime isn't used in the function definition:
src/bam/record.rs#L2336
warning: this lifetime isn't used in the function definition
--> src/bam/record.rs:2336:23
|
2336 | 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
|
unneeded `return` statement:
src/bam/record.rs#L2327
warning: unneeded `return` statement
--> src/bam/record.rs:2327:13
|
2327 | return slice::from_raw_parts(data_ptr, n as usize);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
2327 - return slice::from_raw_parts(data_ptr, n as usize);
2327 + slice::from_raw_parts(data_ptr, n as usize)
|
|
unneeded `return` statement:
src/bam/record.rs#L2311
warning: unneeded `return` statement
--> src/bam/record.rs:2311:13
|
2311 | 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`
|
2311 - return Ok(ret as usize);
2311 + Ok(ret as usize)
|
|
unneeded `return` statement:
src/bam/record.rs#L2283
warning: unneeded `return` statement
--> src/bam/record.rs:2283:9
|
2283 | 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`
|
2283 - return Ok(bm);
2283 + Ok(bm)
|
|
the following explicit lifetimes could be elided: 'a:
src/bam/record.rs#L2259
warning: the following explicit lifetimes could be elided: 'a
--> src/bam/record.rs:2259:12
|
2259 | 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
help: elide the lifetimes
|
2259 - fn new<'a>(r: &'a Record) -> Result<BaseModificationState<'a>> {
2259 + fn new(r: &Record) -> Result<BaseModificationState<'_>> {
|
|
the following explicit lifetimes could be elided: 'a:
src/bam/record.rs#L1666
warning: the following explicit lifetimes could be elided: 'a
--> src/bam/record.rs:1666:13
|
1666 | unsafe impl<'a> Sync for Seq<'a> {}
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
1666 - unsafe impl<'a> Sync for Seq<'a> {}
1666 + unsafe impl Sync for Seq<'_> {}
|
|
the following explicit lifetimes could be elided: 'a:
src/bam/record.rs#L1665
warning: the following explicit lifetimes could be elided: 'a
--> src/bam/record.rs:1665:13
|
1665 | unsafe impl<'a> Send for Seq<'a> {}
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
1665 - unsafe impl<'a> Send for Seq<'a> {}
1665 + unsafe impl Send for Seq<'_> {}
|
|
the following explicit lifetimes could be elided: 'a:
src/bam/record.rs#L1656
warning: the following explicit lifetimes could be elided: 'a
--> src/bam/record.rs:1656:6
|
1656 | impl<'a> ops::Index<usize> for Seq<'a> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
1656 - impl<'a> ops::Index<usize> for Seq<'a> {
1656 + impl ops::Index<usize> for Seq<'_> {
|
|
unsafe function's docs are missing a `# Safety` section:
src/bam/record.rs#L1637
warning: unsafe function's docs are missing a `# Safety` section
--> src/bam/record.rs:1637:5
|
1637 | 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
|
unsafe function's docs are missing a `# Safety` section:
src/bam/record.rs#L1629
warning: unsafe function's docs are missing a `# Safety` section
--> src/bam/record.rs:1629:5
|
1629 | 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
|
the following explicit lifetimes could be elided: 'a:
src/bam/record.rs#L1620
warning: the following explicit lifetimes could be elided: 'a
--> src/bam/record.rs:1620:6
|
1620 | impl<'a> Seq<'a> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
1620 - impl<'a> Seq<'a> {
1620 + impl Seq<'_> {
|
|
using `map_err` over `inspect_err`:
src/bam/record.rs#L1574
warning: using `map_err` over `inspect_err`
--> src/bam/record.rs:1574:18
|
1574 | .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
|
1574 ~ .inspect_err(|e| {
1575 | // In the case of an error, we can not safely advance in the aux data, so we terminate the Iteration
1576 ~ self.aux = &[];
|
|
the following explicit lifetimes could be elided: 'a:
src/bam/record.rs#L1496
warning: the following explicit lifetimes could be elided: 'a
--> src/bam/record.rs:1496:6
|
1496 | impl<'a, T> AuxArrayRawLeBytes<'a, T>
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
1496 - impl<'a, T> AuxArrayRawLeBytes<'a, T>
1496 + impl<T> AuxArrayRawLeBytes<'_, T>
|
|
the following explicit lifetimes could be elided: 'a:
src/bam/record.rs#L1475
warning: the following explicit lifetimes could be elided: 'a
--> src/bam/record.rs:1475:6
|
1475 | impl<'a, T> AuxArrayTargetType<'a, T>
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
1475 - impl<'a, T> AuxArrayTargetType<'a, T>
1475 + impl<T> AuxArrayTargetType<'_, T>
|
|
the following explicit lifetimes could be elided: 'a:
src/bam/record.rs#L1306
warning: the following explicit lifetimes could be elided: 'a
--> src/bam/record.rs:1306:13
|
1306 | unsafe impl<'a> Sync for Aux<'a> {}
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
1306 - unsafe impl<'a> Sync for Aux<'a> {}
1306 + unsafe impl Sync for Aux<'_> {}
|
|
the following explicit lifetimes could be elided: 'a:
src/bam/record.rs#L1305
warning: the following explicit lifetimes could be elided: 'a
--> src/bam/record.rs:1305:13
|
1305 | unsafe impl<'a> Send for Aux<'a> {}
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
1305 - unsafe impl<'a> Send for Aux<'a> {}
1305 + unsafe impl Send for Aux<'_> {}
|
|
casting raw pointers to the same type and constness is unnecessary (`*mut u8` -> `*mut u8`):
src/bam/record.rs#L828
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
|
casting raw pointers to the same type and constness is unnecessary (`*mut u8` -> `*mut u8`):
src/bam/record.rs#L814
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
|
importing legacy numeric constants:
src/bam/record.rs#L17
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
|
the following explicit lifetimes could be elided: 'a:
src/bam/pileup.rs#L177
warning: the following explicit lifetimes could be elided: 'a
--> src/bam/pileup.rs:177:6
|
177 | impl<'a, R: bam::Read> Drop for Pileups<'a, R> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
177 - impl<'a, R: bam::Read> Drop for Pileups<'a, R> {
177 + impl<R: bam::Read> Drop for Pileups<'_, R> {
|
|
the following explicit lifetimes could be elided: 'a:
src/bam/pileup.rs#L156
warning: the following explicit lifetimes could be elided: 'a
--> src/bam/pileup.rs:156:6
|
156 | impl<'a, R: bam::Read> Iterator for Pileups<'a, R> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
156 - impl<'a, R: bam::Read> Iterator for Pileups<'a, R> {
156 + impl<R: bam::Read> Iterator for Pileups<'_, R> {
|
|
usage of a legacy numeric method:
src/bam/pileup.rs#L145
warning: usage of a legacy numeric method
--> src/bam/pileup.rs:145:22
|
145 | i32::max_value(),
| ^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
help: use the associated constant instead
|
145 | i32::MAX,
| ~~~
|
usage of a legacy numeric method:
src/bam/pileup.rs#L142
warning: usage of a legacy numeric method
--> src/bam/pileup.rs:142:25
|
142 | if depth > i32::max_value() as u32 {
| ^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
= note: `#[warn(clippy::legacy_numeric_constants)]` on by default
help: use the associated constant instead
|
142 | if depth > i32::MAX as u32 {
| ~~~
|
the following explicit lifetimes could be elided: 'a:
src/bam/pileup.rs#L63
warning: the following explicit lifetimes could be elided: 'a
--> src/bam/pileup.rs:63:6
|
63 | impl<'a> fmt::Debug for Alignment<'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
|
63 - impl<'a> fmt::Debug for Alignment<'a> {
63 + impl fmt::Debug for Alignment<'_> {
|
|
this item has comments with 4 forward slashes (`////`). These look like doc comments, but they aren't:
src/bam/ext.rs#L1
warning: this item has comments with 4 forward slashes (`////`). These look like doc comments, but they aren't
--> src/bam/ext.rs:1:1
|
1 | / //// Copyright 2019 Johannes Köster and Florian Finkernagel.
2 | | // Licensed under the MIT license (http://opensource.org/licenses/MIT)
3 | | // This file may not be copied, modified, or distributed
4 | | // except according to those terms.
... |
7 | |
8 | | use crate::bam;
| |_
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#four_forward_slashes
= note: `#[warn(clippy::four_forward_slashes)]` on by default
help: make this a doc comment by removing one `/`
|
1 + /// Copyright 2019 Johannes Köster and Florian Finkernagel.
|
|
field `hts_format` is never read:
src/tbx/mod.rs#L94
warning: field `hts_format` is never read
--> src/tbx/mod.rs:94:5
|
87 | pub struct Reader {
| ------ field in this struct
...
94 | hts_format: htslib::htsExactFormat,
| ^^^^^^^^^^
|
= note: `Reader` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis
|
field `buffer` is never read:
src/bcf/record.rs#L134
warning: field `buffer` is never read
--> src/bcf/record.rs:134:5
|
132 | pub struct BufferBacked<'a, T: 'a + fmt::Debug, B: Borrow<Buffer> + 'a> {
| ------------ field in this struct
133 | value: T,
134 | buffer: B,
| ^^^^^^
|
= note: `BufferBacked` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis
= note: `#[warn(dead_code)]` on by default
|
unnecessary parentheses around function argument:
src/bam/mod.rs#L1395
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);
|
|
release-please
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
|
release-please:
src/bam/mod.rs#L1395
unnecessary parentheses around function argument
|
release-please:
src/bcf/record.rs#L134
field `buffer` is never read
|
release-please:
src/tbx/mod.rs#L94
field `hts_format` is never read
|
release-please:
src/bam/record.rs#L140
the type `hts_sys::bam1_t` does not permit being left uninitialized
|
release-please
`rust-htslib` (lib) generated 4 warnings (run `cargo fix --lib -p rust-htslib` to apply 1 suggestion)
|
release-please
The `save-state` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
release-please
The `save-state` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
release-please
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
release-please
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
release-please
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
release-please
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
release-please
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|