Skip to content

Commit

Permalink
if else instead of match
Browse files Browse the repository at this point in the history
  • Loading branch information
waahm7 committed Aug 13, 2024
1 parent 4ca8c9f commit 95ce181
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions runners/s3-benchrunner-rust/src/transfer_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,10 @@ impl TransferManagerRunner {
async fn upload(&self, task_config: &TaskConfig) -> Result<()> {
let key = &task_config.key;

let stream = match self.config().workload.files_on_disk {
true => InputStream::from_path(key).with_context(|| "Failed to create stream")?,
false => self.handle.random_data_for_upload.clone().into(),
let stream = if self.config().workload.files_on_disk {
InputStream::from_path(key).with_context(|| "Failed to create stream")?
} else {
self.handle.random_data_for_upload.clone().into()
};

self.handle
Expand Down

0 comments on commit 95ce181

Please sign in to comment.