varfish-org / hgvs-rs

A port of biocommons/hgvs to the Rust programming language
Apache License 2.0
11 stars 4 forks source link

feat: replacing usages of unwrap() with expect or Result (#70) #73

Closed holtgrewe closed 1 year ago

holtgrewe commented 1 year ago

The remaining places are OK

$ rg -w unwrap
src/parser/ds.rs
32:    pub fn unwrap(self) -> T {
965:        assert_eq!(Mu::Certain(1).unwrap(), 1);
966:        assert_eq!(Mu::Uncertain(1).unwrap(), 1);
codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 88.34% and project coverage change: -0.08 :warning:

Comparison is base (a44e28c) 88.31% compared to head (f9c6732) 88.23%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #73 +/- ## ========================================== - Coverage 88.31% 88.23% -0.08% ========================================== Files 19 19 Lines 7470 7516 +46 ========================================== + Hits 6597 6632 +35 - Misses 873 884 +11 ``` | [Impacted Files](https://codecov.io/gh/bihealth/hgvs-rs/pull/73?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bihealth) | Coverage Δ | | |---|---|---| | [src/data/uta\_sr.rs](https://codecov.io/gh/bihealth/hgvs-rs/pull/73?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bihealth#diff-c3JjL2RhdGEvdXRhX3NyLnJz) | `53.01% <ø> (ø)` | | | [src/normalizer.rs](https://codecov.io/gh/bihealth/hgvs-rs/pull/73?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bihealth#diff-c3JjL25vcm1hbGl6ZXIucnM=) | `70.76% <52.38%> (-0.67%)` | :arrow_down: | | [src/mapper/assembly.rs](https://codecov.io/gh/bihealth/hgvs-rs/pull/73?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bihealth#diff-c3JjL21hcHBlci9hc3NlbWJseS5ycw==) | `80.34% <71.42%> (ø)` | | | [src/data/uta.rs](https://codecov.io/gh/bihealth/hgvs-rs/pull/73?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bihealth#diff-c3JjL2RhdGEvdXRhLnJz) | `91.54% <83.33%> (-0.16%)` | :arrow_down: | | [src/mapper/alignment.rs](https://codecov.io/gh/bihealth/hgvs-rs/pull/73?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bihealth#diff-c3JjL21hcHBlci9hbGlnbm1lbnQucnM=) | `91.78% <87.80%> (+0.01%)` | :arrow_up: | | [src/data/cdot/json.rs](https://codecov.io/gh/bihealth/hgvs-rs/pull/73?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bihealth#diff-c3JjL2RhdGEvY2RvdC9qc29uLnJz) | `93.69% <100.00%> (+0.01%)` | :arrow_up: | | [src/mapper/altseq.rs](https://codecov.io/gh/bihealth/hgvs-rs/pull/73?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bihealth#diff-c3JjL21hcHBlci9hbHRzZXEucnM=) | `95.08% <100.00%> (+0.12%)` | :arrow_up: | | [src/mapper/cigar.rs](https://codecov.io/gh/bihealth/hgvs-rs/pull/73?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bihealth#diff-c3JjL21hcHBlci9jaWdhci5ycw==) | `96.53% <100.00%> (+0.09%)` | :arrow_up: | | [src/mapper/variant.rs](https://codecov.io/gh/bihealth/hgvs-rs/pull/73?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bihealth#diff-c3JjL21hcHBlci92YXJpYW50LnJz) | `90.81% <100.00%> (+0.01%)` | :arrow_up: | | [src/parser/impl\_parse.rs](https://codecov.io/gh/bihealth/hgvs-rs/pull/73?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bihealth#diff-c3JjL3BhcnNlci9pbXBsX3BhcnNlLnJz) | `99.69% <100.00%> (+<0.01%)` | :arrow_up: | | ... and [3 more](https://codecov.io/gh/bihealth/hgvs-rs/pull/73?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bihealth) | | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bihealth). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bihealth)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.