diff --git a/aws-s3-transfer-manager/tests/download_test.rs b/aws-s3-transfer-manager/tests/download_test.rs index f3ebed7..8bcddb1 100644 --- a/aws-s3-transfer-manager/tests/download_test.rs +++ b/aws-s3-transfer-manager/tests/download_test.rs @@ -70,17 +70,14 @@ fn simple_object_connector(data: &Bytes, part_size: usize) -> StaticReplayClient .enumerate() .map(|(idx, chunk)| { let start = idx * part_size; - let end = std::cmp::min(start+part_size, data.len()) - 1; + let end = std::cmp::min(start + part_size, data.len()) - 1; ReplayEvent::new( // NOTE: Rather than try to recreate all the expected requests we just put in placeholders and // make our own assertions against the captured requests. dummy_expected_request(), http_02x::Response::builder() .status(200) - .header( - "Content-Length", - format!("{}", end-start+1), - ) + .header("Content-Length", format!("{}", end - start + 1)) .header( "Content-Range", format!("bytes {start}-{end}/{}", data.len()), @@ -231,10 +228,7 @@ async fn test_retry_failed_chunk() { dummy_expected_request(), http_02x::Response::builder() .status(200) - .header( - "Content-Length", - format!("{}", part_size), - ) + .header("Content-Length", format!("{}", part_size)) .header( "Content-Range", format!("bytes 0-{}/{}", part_size - 1, data.len()), @@ -247,10 +241,7 @@ async fn test_retry_failed_chunk() { dummy_expected_request(), http_02x::Response::builder() .status(200) - .header( - "Content-Length", - format!("{}", data.len() - part_size), - ) + .header("Content-Length", format!("{}", data.len() - part_size)) .header( "Content-Range", format!("bytes {}-{}/{}", part_size, data.len(), data.len()), @@ -267,10 +258,7 @@ async fn test_retry_failed_chunk() { dummy_expected_request(), http_02x::Response::builder() .status(200) - .header( - "Content-Length", - format!("{}", data.len() - part_size), - ) + .header("Content-Length", format!("{}", data.len() - part_size)) .header( "Content-Range", format!("bytes {}-{}/{}", part_size, data.len(), data.len()), @@ -317,10 +305,7 @@ async fn test_non_retryable_error() { dummy_expected_request(), http_02x::Response::builder() .status(200) - .header( - "Content-Length", - format!("{}", part_size), - ) + .header("Content-Length", format!("{}", part_size)) .header( "Content-Range", format!("bytes 0-{}/{}", part_size - 1, data.len()), @@ -367,10 +352,7 @@ async fn test_retry_max_attempts() { dummy_expected_request(), http_02x::Response::builder() .status(200) - .header( - "Content-Length", - format!("{}", part_size), - ) + .header("Content-Length", format!("{}", part_size)) .header( "Content-Range", format!("bytes {}-{}/{}", part_size, data.len(), data.len()), @@ -390,10 +372,7 @@ async fn test_retry_max_attempts() { dummy_expected_request(), http_02x::Response::builder() .status(200) - .header( - "Content-Length", - format!("{}", part_size), - ) + .header("Content-Length", format!("{}", part_size)) .header( "Content-Range", format!("bytes 0-{}/{}", part_size - 1, data.len()),