From 95ce181a6d345996892c92fafe1d0e009b3b310e Mon Sep 17 00:00:00 2001 From: Waqar Ahmed Khan Date: Tue, 13 Aug 2024 10:14:55 -0700 Subject: [PATCH] if else instead of match --- runners/s3-benchrunner-rust/src/transfer_manager.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/runners/s3-benchrunner-rust/src/transfer_manager.rs b/runners/s3-benchrunner-rust/src/transfer_manager.rs index 882ab606..5f76bb1f 100644 --- a/runners/s3-benchrunner-rust/src/transfer_manager.rs +++ b/runners/s3-benchrunner-rust/src/transfer_manager.rs @@ -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