Skip to content

feat: add /api/v1/seqvars/annos/query with OpenAPI (#577) #915

feat: add /api/v1/seqvars/annos/query with OpenAPI (#577)

feat: add /api/v1/seqvars/annos/query with OpenAPI (#577) #915

GitHub Actions / clippy succeeded Nov 18, 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.82.0 (f6e511eec 2024-10-15)
  • cargo 1.82.0 (8f40fc59f 2024-08-21)
  • clippy 0.1.82 (f6e511e 2024-10-15)

Annotations

Check warning on line 350 in src/server/run/clinvar_sv.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/server/run/clinvar_sv.rs:350:13
    |
350 |             TryInto::<Request>::try_into(query.into_inner()).map_err(|e| {
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `Into::into`
    |
    = note: converting `StrucvarsClinvarQuery` to `Request` 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 229 in src/server/run/clinvar_sv.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true

warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true
   --> src/server/run/clinvar_sv.rs:229:1
    |
229 | impl Into<Request> for StrucvarsClinvarQuery {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into
help: replace the `Into` implementation with `From<server::run::clinvar_sv::StrucvarsClinvarQuery>`
    |
229 ~ impl From<StrucvarsClinvarQuery> for Request {
230 ~     fn from(val: StrucvarsClinvarQuery) -> Self {
231 |         Request {
232 ~             genome_release: val.genome_release.to_string(),
233 ~             chromosome: val.chromosome,
234 ~             start: val.start,
235 ~             stop: val.stop,
236 ~             variation_types: val
237 |                 .variation_types
238 |                 .map(|v| v.into_iter().map(Into::into).collect()),
239 ~             min_overlap: val.min_overlap,
240 ~             page_no: val.page_no,
241 ~             page_size: val.page_size,
    |

Check warning on line 7087 in src/server/run/clinvar_data.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true

warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true
    --> src/server/run/clinvar_data.rs:7087:1
     |
7087 | impl Into<pbs::clinvar_data::extracted_vars::VariationType> for ClinvarExtractedVariationType {
     | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into
help: replace the `Into` implementation with `From<server::run::clinvar_data::ClinvarExtractedVariationType>`
     |
7087 ~ impl From<ClinvarExtractedVariationType> for pbs::clinvar_data::extracted_vars::VariationType {
7088 ~     fn from(val: ClinvarExtractedVariationType) -> Self {
7089 ~         match val {
     |

Check warning on line 1268 in src/server/run/annos_variant.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

redundant closure

warning: redundant closure
    --> src/server/run/annos_variant.rs:1268:26
     |
1268 |                 .map_err(|e| CustomError::new(e))
     |                          ^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `CustomError::new`
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure

Check warning on line 1218 in src/server/run/annos_variant.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

redundant closure

warning: redundant closure
    --> src/server/run/annos_variant.rs:1218:26
     |
1218 |                 .map_err(|e| CustomError::new(e))
     |                          ^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `CustomError::new`
     |
     = 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

Check warning on line 988 in src/server/run/annos_variant.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true

warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true
   --> src/server/run/annos_variant.rs:988:5
    |
988 |     impl Into<HelixMtDbRecord> for crate::pbs::helixmtdb::Record {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into
    = note: `#[warn(clippy::from_over_into)]` on by default
help: replace the `Into` implementation with `From<pbs::helixmtdb::Record>`
    |
988 ~     impl From<crate::pbs::helixmtdb::Record> for HelixMtDbRecord {
989 ~         fn from(val: crate::pbs::helixmtdb::Record) -> Self {
990 |             HelixMtDbRecord {
991 ~                 chrom: val.chrom,
992 ~                 pos: val.pos,
993 ~                 ref_allele: val.ref_allele,
994 ~                 alt_allele: val.alt_allele,
995 ~                 num_total: val.num_total,
996 ~                 num_het: val.num_het,
997 ~                 num_hom: val.num_hom,
998 ~                 feature_type: val.feature_type,
999 ~                 gene_name: val.gene_name,
    |