-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor
PineconeError
: use thiserror
/anyhow
, ensure we support…
… `Send + Sync` (#56) ## Problem Currently, `PineconeError` contains a lot of boilerplate for implementing `std::error::Error`. @haruska suggested we could maybe simplify some of the boilerplate using the `thiserror` and `anyhow` crates. Additionally, there was an enhancement filed (#54) to implement `Send` + `Sync` for `PineconeError` as currently we're unable to use `PineconeError` in a multithreaded context. ## Solution Refactor PineconeError to use thiserror and anyhow to reduce some of our boilerplate for the custom error enum, make sure we can safely use PineconeError with Send and Sync, add unit test for this ## Type of Change - [ ] Bug fix (non-breaking change which fixes an issue) - [X] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] This change requires a documentation update - [ ] Infrastructure change (CI configs, etc) - [ ] Non-code change (docs, etc) - [ ] None of the above: (explain here) ## Test Plan New unit test added to verify that `PineoneError` has properly implemented the `Send` and `Sync` traits. `cargo test` -> validate CI passes as expected --- - To see the specific tasks where the Asana app for GitHub is being used, see below: - https://app.asana.com/0/0/1208161607942725 - https://app.asana.com/0/0/1208161607942720
- Loading branch information
1 parent
412a7f0
commit fc241fe
Showing
5 changed files
with
59 additions
and
136 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters