Skip to content

Commit a250d21

Browse files
committed
appease clippy
1 parent d23de07 commit a250d21

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

aws-s3-transfer-manager/src/metrics.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ pub struct ThroughputDisplayContext<'a> {
284284
pub unit: unit::ByteUnit,
285285
}
286286

287-
impl<'a> fmt::Display for ThroughputDisplayContext<'a> {
287+
impl fmt::Display for ThroughputDisplayContext<'_> {
288288
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
289289
if let Some(precision) = f.precision() {
290290
write!(

aws-s3-transfer-manager/src/operation/upload/checksum_strategy.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ impl Builder {
251251
}
252252
};
253253

254-
if self.full_object_checksum.is_some() && &type_if_multipart != &ChecksumType::FullObject {
254+
if self.full_object_checksum.is_some() && type_if_multipart != ChecksumType::FullObject {
255255
return Err(BuildError::invalid_field("full_object_checksum",
256256
format!("You cannot provide the full object checksum value up front when the multipart checksum type is `{type_if_multipart}` (algorithm is `{algorithm}`)")
257257
));

aws-s3-transfer-manager/tests/download_test.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ use aws_smithy_runtime::client::http::test_util::{ReplayEvent, StaticReplayClien
2121
use aws_smithy_types::body::SdkBody;
2222
use bytes::{BufMut, Bytes, BytesMut};
2323

24-
/// NOTE: these tests are somewhat brittle as they assume particular paths through the codebase.
25-
/// As an example we generally assume object discovery goes through `GetObject` with a ranged get
26-
/// for the first part.
24+
// NOTE: these tests are somewhat brittle as they assume particular paths through the codebase.
25+
// As an example we generally assume object discovery goes through `GetObject` with a ranged get
26+
// for the first part.
2727

2828
fn rand_data(size: usize) -> Bytes {
2929
iter::repeat_with(fastrand::alphanumeric)

aws-s3-transfer-manager/tests/upload_checksum_test.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ pin_project! {
138138
impl TestStream {
139139
pub fn new(parts: Vec<Bytes>) -> Self {
140140
TestStream {
141-
parts: parts,
141+
parts,
142142
next_part_num: 1,
143143
}
144144
}
@@ -347,8 +347,8 @@ fn mock_s3_client_for_put_object(
347347
let mut mock_client_rules: Vec<Rule> = Vec::new();
348348

349349
// Pre-calculate stuff for later
350-
let checksum_value = calculate_checksum(&response_algorithm, &expected_body);
351-
let etag = calculate_etag(&expected_body);
350+
let checksum_value = calculate_checksum(&response_algorithm, expected_body);
351+
let etag = calculate_etag(expected_body);
352352

353353
// PutObject
354354
mock_client_rules.push(
@@ -477,7 +477,7 @@ async fn upload_helper(
477477
s3_client
478478
.config()
479479
.to_builder()
480-
.request_checksum_calculation(sdk_checksum_calculation.clone())
480+
.request_checksum_calculation(sdk_checksum_calculation)
481481
.build(),
482482
);
483483

0 commit comments

Comments
 (0)