Refactor/use new bitnuc - #102
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates the bitnuc dependency to version 0.5.1 and introduces bitnuc-deprec (v0.4.1) to maintain compatibility for legacy formats (bq/vbq). In src/cbq/core/block.rs, the sequence encoding and decoding are updated to use the new bitnuc APIs with a byte-native Vec<u8> buffer, while maintaining on-disk compatibility with the legacy u64 layout through padding. Feedback suggests distinguishing the error messages for the legacy and new bitnuc errors in src/error.rs to avoid confusion during debugging.
| BitnucError(#[from] bitnuc_deprec::Error), | ||
|
|
||
| /// Errors from the bitnuc dependency for nucleotide encoding/decoding (cbq) | ||
| #[error("Bitnuc error: {0}")] |
There was a problem hiding this comment.
This error message is identical to the one for BitnucError (for the legacy bitnuc-deprec crate). This could cause confusion during debugging, as it's not immediately clear which version of the bitnuc dependency is the source of an error. To improve clarity, consider making the error messages unique. For example, you could change this message and the one for the legacy error to include version numbers or a 'legacy' tag.
| #[error("Bitnuc error: {0}")] | |
| #[error("Bitnuc (v0.5.1) error: {0}")] |
No description provided.