Skip to content

Commit

Permalink
MRG: fix beta clippy errors (#3548)
Browse files Browse the repository at this point in the history
Fixes errors encountered in #3547. Note: includes #3547!
```
error: struct pattern is not needed for a unit variant
   --> src/core/src/errors.rs:167:48
    |
167 |             SourmashError::CannotUpsampleScaled { .. } => SourmashErrorCode::CannotUpsampleScaled,
    |                                                ^^^^^^^ help: remove the struct pattern
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unneeded_struct_pattern
    = note: `-D clippy::unneeded-struct-pattern` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::unneeded_struct_pattern)]`

error: struct pattern is not needed for a unit variant
   --> src/core/src/errors.rs:169:50
    |
169 |             SourmashError::NeedsAbundanceTracking { .. } => {
    |                                                  ^^^^^^^ help: remove the struct pattern
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unneeded_struct_pattern

error: struct pattern is not needed for a unit variant
   --> src/core/src/errors.rs:190:46
    |
190 |             SourmashError::HLLPrecisionBounds { .. } => SourmashErrorCode::HLLPrecisionBounds,
    |                                              ^^^^^^^ help: remove the struct pattern
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unneeded_struct_pattern
```

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
ctb and pre-commit-ci[bot] authored Feb 26, 2025
1 parent 4045737 commit a76da78
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/core/src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -164,11 +164,9 @@ impl SourmashErrorCode {
match error {
SourmashError::Internal { .. } => SourmashErrorCode::Internal,
SourmashError::Panic { .. } => SourmashErrorCode::Panic,
SourmashError::CannotUpsampleScaled { .. } => SourmashErrorCode::CannotUpsampleScaled,
SourmashError::CannotUpsampleScaled => SourmashErrorCode::CannotUpsampleScaled,
SourmashError::MismatchNum { .. } => SourmashErrorCode::MismatchNum,
SourmashError::NeedsAbundanceTracking { .. } => {
SourmashErrorCode::NeedsAbundanceTracking
}
SourmashError::NeedsAbundanceTracking => SourmashErrorCode::NeedsAbundanceTracking,
SourmashError::MismatchKSizes => SourmashErrorCode::MismatchKSizes,
SourmashError::MismatchDNAProt => SourmashErrorCode::MismatchDNAProt,
SourmashError::MismatchScaled => SourmashErrorCode::MismatchScaled,
Expand All @@ -187,7 +185,7 @@ impl SourmashErrorCode {
SourmashError::InvalidTranslateFrame { .. } => SourmashErrorCode::InvalidTranslateFrame,
SourmashError::ReadDataError { .. } => SourmashErrorCode::ReadData,
SourmashError::StorageError { .. } => SourmashErrorCode::Storage,
SourmashError::HLLPrecisionBounds { .. } => SourmashErrorCode::HLLPrecisionBounds,
SourmashError::HLLPrecisionBounds => SourmashErrorCode::HLLPrecisionBounds,
SourmashError::ANIEstimationError { .. } => SourmashErrorCode::ANIEstimationError,
SourmashError::SerdeError { .. } => SourmashErrorCode::SerdeError,
SourmashError::IOError { .. } => SourmashErrorCode::Io,
Expand Down

0 comments on commit a76da78

Please sign in to comment.