Skip to content

fix: use array instead of Vec for Codon representation (and other free perf improvements) #289

fix: use array instead of Vec for Codon representation (and other free perf improvements)

fix: use array instead of Vec for Codon representation (and other free perf improvements) #289

GitHub Actions / clippy succeeded Apr 30, 2024 in 0s

clippy

6 warnings

Details

Results

Message level Amount
Internal compiler error 0
Error 0
Warning 6
Note 0
Help 0

Versions

  • rustc 1.77.2 (25ef9e3d8 2024-04-09)
  • cargo 1.77.2 (e52e36006 2024-03-26)
  • clippy 0.1.77 (25ef9e3 2024-04-09)

Annotations

Check warning on line 497 in src/parser/ds.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

use of a fallible conversion when an infallible one could be used

warning: use of a fallible conversion when an infallible one could be used
   --> src/parser/ds.rs:497:18
    |
497 |                 .try_into()
    |                  ^^^^^^^^ help: use: `into`
    |
    = note: converting `RnaInterval` to `Range<i32>` cannot fail
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fallible_conversions

Check warning on line 490 in src/parser/ds.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

use of a fallible conversion when an infallible one could be used

warning: use of a fallible conversion when an infallible one could be used
   --> src/parser/ds.rs:490:18
    |
490 |                 .try_into()
    |                  ^^^^^^^^ help: use: `into`
    |
    = note: converting `TxInterval` to `Range<i32>` cannot fail
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fallible_conversions
    = note: `#[warn(clippy::unnecessary_fallible_conversions)]` on by default

Check warning on line 60 in src/mapper/alignment.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

writing `&Vec` instead of `&[_]` involves a new object where a slice will do

warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do
  --> src/mapper/alignment.rs:60:30
   |
60 | pub fn build_tx_cigar(exons: &Vec<TxExonsRecord>, strand: i16) -> Result<CigarString, Error> {
   |                              ^^^^^^^^^^^^^^^^^^^ help: change this to: `&[TxExonsRecord]`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg
   = note: `#[warn(clippy::ptr_arg)]` on by default

Check warning on line 775 in src/data/cdot/json.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this call to `as_ref.map(...)` does nothing

warning: this call to `as_ref.map(...)` does nothing
   --> src/data/cdot/json.rs:775:22
    |
775 |             aliases: gene.aliases.as_ref().map(Clone::clone).unwrap_or_default(),
    |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `gene.aliases.clone()`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_asref

Check warning on line 774 in src/data/cdot/json.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this call to `as_ref.map(...)` does nothing

warning: this call to `as_ref.map(...)` does nothing
   --> src/data/cdot/json.rs:774:22
    |
774 |             summary: gene.summary.as_ref().map(Clone::clone).unwrap_or_default(),
    |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `gene.summary.clone()`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_asref

Check warning on line 772 in src/data/cdot/json.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this call to `as_ref.map(...)` does nothing

warning: this call to `as_ref.map(...)` does nothing
   --> src/data/cdot/json.rs:769:20
    |
769 |               descr: gene
    |  ____________________^
770 | |                 .description
771 | |                 .as_ref()
772 | |                 .map(Clone::clone)
    | |__________________________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_asref
    = note: `#[warn(clippy::useless_asref)]` on by default
help: try
    |
769 ~             descr: gene
770 +                 .description.clone()
    |