Skip to content

Commit

Permalink
Resolve clippy errors introduced in Rust 1.78.0 (#865)
Browse files Browse the repository at this point in the history
Address 2 issues:

* Assigning clones (https://rust-lang.github.io/rust-clippy/master/index.html#/assigning_clones)
  Use `clone_into()` instead of assigning the result of `ToOwned::to_owned()` or `Clone::clone()`.

* Remove the unused `mountpoint-s3-client::util::PtrExt`
  Redundant. Similar functionality now in `mountpoint-s3-crt::CrtError`.

Signed-off-by: Alessandro Passaro <[email protected]>
  • Loading branch information
passaro authored May 3, 2024
1 parent e32f890 commit 9d22f1f
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 27 deletions.
2 changes: 1 addition & 1 deletion mountpoint-s3-client/src/endpoint_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ impl EndpointConfig {
/// Set region for a given endpoint config
#[must_use = "EndpointConfig follows a builder pattern"]
pub fn region(mut self, region: &str) -> Self {
self.region = region.to_owned();
region.clone_into(&mut self.region);
self
}

Expand Down
1 change: 0 additions & 1 deletion mountpoint-s3-client/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ mod object_client;
mod s3_crt_client;
#[doc(hidden)]
pub mod user_agent;
mod util;

pub use object_client::{ObjectClient, PutObjectRequest};

Expand Down
2 changes: 1 addition & 1 deletion mountpoint-s3-client/src/mock_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -730,7 +730,7 @@ impl ObjectClient for MockClient {
};
result.object_parts = parts;
}
ObjectAttribute::StorageClass => result.storage_class = object.storage_class.clone(),
ObjectAttribute::StorageClass => object.storage_class.clone_into(&mut result.storage_class),
ObjectAttribute::ObjectSize => result.object_size = Some(object.size as u64),
}
}
Expand Down
24 changes: 0 additions & 24 deletions mountpoint-s3-client/src/util.rs

This file was deleted.

0 comments on commit 9d22f1f

Please sign in to comment.