Page MenuHomePhabricator

[services] Backup - Connect to Blob - Rust - Get rid of expect
AbandonedPublic

Authored by karol on Aug 29 2022, 1:39 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Jun 18, 11:28 AM
Unknown Object (File)
May 2 2024, 1:42 PM
Unknown Object (File)
Apr 21 2024, 2:57 PM
Unknown Object (File)
Apr 21 2024, 2:57 PM
Unknown Object (File)
Apr 21 2024, 2:53 PM
Unknown Object (File)
Apr 17 2024, 6:36 PM
Unknown Object (File)
Apr 12 2024, 3:10 AM
Unknown Object (File)
Apr 9 2024, 12:07 PM

Details

Summary

Depends on D4973

As suggested in D4870, we should not use expect

Test Plan

Service builds correctly

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

tomek requested changes to this revision.Aug 29 2022, 5:41 AM

This diff increases the indentation by a lot. Could you find a way to refactor the code? (using e.g. early exits, match statements, etc.)

services/backup/blob_client/src/put_client.rs
47–59

This can be simplified to be a single match

66

Do we really want to always execute error!("could not access error messages") code? Was this behavior tested?

87–88

Can we return a value from block_on?

119–121
This revision now requires changes to proceed.Aug 29 2022, 5:41 AM

Abandoning this stack in favor of the new one that starts @ D5002.

All the comments have been either addressed inline or in the new stack.