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)
Sun, Nov 10, 6:58 AM
Unknown Object (File)
Sun, Oct 27, 8:10 PM
Unknown Object (File)
Sun, Oct 27, 8:09 PM
Unknown Object (File)
Oct 1 2024, 4:40 PM
Unknown Object (File)
Sep 28 2024, 1:31 AM
Unknown Object (File)
Sep 26 2024, 8:36 PM
Unknown Object (File)
Sep 26 2024, 8:36 PM
Unknown Object (File)
Sep 26 2024, 8:31 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.