diff --git a/services/commtest/tests/backup/add_attachments.rs b/services/commtest/tests/backup/add_attachments.rs --- a/services/commtest/tests/backup/add_attachments.rs +++ b/services/commtest/tests/backup/add_attachments.rs @@ -24,13 +24,13 @@ let log_id = backup_data.log_items[index].id.clone(); println!("add attachments for log {}/{}", index, log_id); log_id - }, + } None => { println!("add attachments for backup"); String::new() - }, + } }; - + let holders: String = match log_index { Some(log_index) => backup_data.log_items[log_index] .attachments_holders diff --git a/services/commtest/tests/backup/pull_backup.rs b/services/commtest/tests/backup/pull_backup.rs --- a/services/commtest/tests/backup/pull_backup.rs +++ b/services/commtest/tests/backup/pull_backup.rs @@ -51,18 +51,15 @@ let mut backup_id: Option = None; let mut log_id: Option = None; match id { - Some(BackupId(id)) => { - backup_id = Some(id) - }, - Some(LogId(id)) => { - log_id = Some(id) - }, - None => {}, + Some(BackupId(id)) => backup_id = Some(id), + Some(LogId(id)) => log_id = Some(id), + None => {} }; match response_data { Some(CompactionChunk(chunk)) => { assert_eq!( - state, State::Compaction, + state, + State::Compaction, "invalid state, expected compaction, got {:?}", state ); @@ -81,9 +78,11 @@ assert_eq!(state, State::Log, "invalid state, expected compaction"); let log_id = log_id.ok_or(IOError::new(ErrorKind::Other, "log id expected but not received"))?; if log_id != current_id { - result - .log_items - .push(Item::new(log_id.clone(), Vec::new(), Vec::new())); + result.log_items.push(Item::new( + log_id.clone(), + Vec::new(), + Vec::new(), + )); current_id = log_id; } let log_items_size = result.log_items.len() - 1; @@ -120,7 +119,7 @@ } } } - None => {}, + None => {} } } Ok(result) diff --git a/services/commtest/tests/blob_test.rs b/services/commtest/tests/blob_test.rs --- a/services/commtest/tests/blob_test.rs +++ b/services/commtest/tests/blob_test.rs @@ -17,8 +17,10 @@ #[tokio::test] async fn blob_test() -> Result<(), Error> { - let port = env::var("COMM_SERVICES_PORT_BLOB").expect("port env var expected but not received"); - let mut client = BlobServiceClient::connect(format!("http://localhost:{}", port)).await?; + let port = env::var("COMM_SERVICES_PORT_BLOB") + .expect("port env var expected but not received"); + let mut client = + BlobServiceClient::connect(format!("http://localhost:{}", port)).await?; let blob_data = vec![ BlobData {