HomePhabricator
Diffusion Comm 1d9460715e6f

[services] Use ensure! macro where possible

Description

[services] Use ensure! macro where possible

Summary:
Resolves ENG-1840. It was suggested to use anyhow::ensure! macro instead of bail! where possible.
There were only few places, where such replacement was possible, as most of the code use bail! with if let which cannot be easily transformed into ensure!.

Test Plan:

  • Backup service container builds
  • Service integration tests pass

Reviewers: marcin, jon

Reviewed By: jon

Subscribers: ashoat, tomek, atul, abosh

Differential Revision: https://phab.comm.dev/D5340

Details

Provenance
bartekAuthored on Oct 11 2022, 12:48 AM
Reviewer
jon
Differential Revision
D5340: [services] Use ensure! macro where possible
Parents
rCOMM8875f4fd7f97: [keyserver] Go back to using window function for getMessageInfos
Branches
Unknown
Tags
Unknown