-
Notifications
You must be signed in to change notification settings - Fork 0
feat: add explicit fuzzy matching errors #392
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: wip
Are you sure you want to change the base?
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing Touches🧪 Generate unit tests
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR enhances the fuzzy matching module by introducing proper error handling instead of panicking on invalid inputs. It adds a FuzzyError enum to handle cases like invalid pattern lengths and inputs that exceed size limits, converting all fuzzy matching APIs to return Result types.
- Add
FuzzyErrorenum withInvalidLengthandInputTooLongvariants - Convert fuzzy matching functions to return
Result<T, FuzzyError>instead of panicking - Expand test coverage for error conditions and update existing tests to handle new Result types
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/fuzzy.rs | Add FuzzyError enum and convert fuzzy matching APIs to return Results |
| tests/fuzzy_match.rs | Update tests to unwrap Results from fuzzy matching functions |
| tests/fuzzy_alloc.rs | Update allocation tests to handle new Result-based APIs |
| tests/resample.rs | Remove extra blank lines (formatting cleanup) |
| tests/num.rs | Remove unused Complex import |
| src/stft.rs | Remove unused FftStrategy import in test configuration |
| src/num.rs | Improve ComplexVec to Vec conversion efficiency |
| src/wavelet.rs | Add dead_code allowances for unused type aliases |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Summary
FuzzyErrorfor invalid length and overlong inputsResultfrom fuzzy matching APIs instead of panickingTesting
cargo clippy --all-targets --all-features -- -D warningscargo test --features "parallel waveform-cache"(fails: complex_mul_large_magnitude)https://chatgpt.com/codex/tasks/task_e_68a7880c1c24832ba3f955d285e5689a