feat: add /api/v1/seqvars/annos/query with OpenAPI (#577) #915
conventional-prs.yml
on: pull_request_target
title-format
4s
Annotations
6 warnings
use of a fallible conversion when an infallible one could be used:
src/server/run/clinvar_sv.rs#L350
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
|
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#L229
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,
|
|
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#L7087
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 {
|
|
redundant closure:
src/server/run/annos_variant.rs#L1268
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
|
redundant closure:
src/server/run/annos_variant.rs#L1218
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
|
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#L988
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,
|
|