Skip to content

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

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

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

GitHub Actions / clippy succeeded Nov 18, 2024 in 0s

clippy

5 warnings

Details

Results

Message level Amount
Internal compiler error 0
Error 0
Warning 5
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
     = note: `#[warn(clippy::from_over_into)]` on by default
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 378 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:378:26
    |
378 |                 .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 358 in src/server/run/annos_variant.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

variable does not need to be mutable

warning: variable does not need to be mutable
   --> src/server/run/annos_variant.rs:358:9
    |
358 |     let mut result = SeqvarsAnnoResponseRecord {
    |         ----^^^^^^
    |         |
    |         help: remove this `mut`
    |
    = note: `#[warn(unused_mut)]` on by default