This is a major refactor of the PeachError type, with associated changes to error-handling throughout the codebase of peach-lib. The snafu dependency has been removed in favour of a custom error implementation. The PeachError variants have also been refined to reduce unnecessary duplication by grouping related errors (total number of variants has been reduced from 27 to 19).
The refactored src/error.rs code is fully documented.
I imagine some fine-tuning may be required as we interact with this library via peach-web and other consumers.
Other Changes
Added module paths for imported functions (for example, config_manager::get_admin_password_hash())
Grouped related use statements by dependency
Removed unnecessary borrows to satisfy clippy
Remove all instances of unwrap() and expect()
Minor code changes to improve idiomaticity and/or ergonomics
This is a major refactor of the `PeachError` type, with associated changes to error-handling throughout the codebase of `peach-lib`. The `snafu` dependency has been removed in favour of a custom error implementation. The `PeachError` variants have also been refined to reduce unnecessary duplication by grouping related errors (total number of variants has been reduced from 27 to 19).
The refactored `src/error.rs` code is fully documented.
I imagine some fine-tuning may be required as we interact with this library via `peach-web` and other consumers.
**Other Changes**
- Added module paths for imported functions (for example, `config_manager::get_admin_password_hash()`)
- Grouped related `use` statements by dependency
- Removed unnecessary borrows to satisfy `clippy`
- Remove all instances of `unwrap()` and `expect()`
- Minor code changes to improve idiomaticity and/or ergonomics
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
This is a major refactor of the
PeachErrortype, with associated changes to error-handling throughout the codebase ofpeach-lib. Thesnafudependency has been removed in favour of a custom error implementation. ThePeachErrorvariants have also been refined to reduce unnecessary duplication by grouping related errors (total number of variants has been reduced from 27 to 19).The refactored
src/error.rscode is fully documented.I imagine some fine-tuning may be required as we interact with this library via
peach-weband other consumers.Other Changes
config_manager::get_admin_password_hash())usestatements by dependencyclippyunwrap()andexpect()I'm going ahead with a merge on this.