lemmy
lemmy copied to clipboard
Cleanup all `Result<bool, Error>`, into `Result<(), Error>`
Requirements
- [X] Is this a feature request? For questions or discussions use https://lemmy.ml/c/lemmy_support
- [X] Did you check to see if this issue already exists?
- [X] Is this only a feature request? Do not put multiple feature requests in one issue.
- [X] Is this a backend issue? Use the lemmy-ui repo for UI / frontend issues.
- [X] Do you agree to follow the rules in our Code of Conduct?
Is your proposal related to a problem?
This is a maintenance task to clean up all or most Result<bool, Error> , into Result<(), Error.
For all these, we only need to care about 2 cases out of the 3:
-
OkandErr, not -
Ok(true),Ok(false), andError
Since we only care about the Some(true) case, and not the Some(false) case, this could lead to some code problems.
Describe the solution you'd like.
See above
Describe alternatives you've considered.
NA
Additional context
https://github.com/LemmyNet/lemmy/pull/4860#discussion_r1649389837