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
F3529828: D4974.id16042.diff
Tue, Dec 24, 9:23 PM
Unknown Object (File)
Sat, Dec 14, 7:02 AM
Unknown Object (File)
Sat, Dec 14, 7:02 AM
Unknown Object (File)
Sat, Dec 14, 6:54 AM
Unknown Object (File)
Wed, Dec 4, 7:07 PM
Unknown Object (File)
Nov 10 2024, 6:58 AM
Unknown Object (File)
Oct 27 2024, 8:10 PM
Unknown Object (File)
Oct 27 2024, 8:09 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.