Skip to content

Commit

Permalink
Resolve clippy warnings introduced in Rust 1.75.0 (#686)
Browse files Browse the repository at this point in the history
* Appease clippy

Making changes based on new clippy rules.
Changes are seen for the following update:

    stable-x86_64-apple-darwin updated - rustc 1.75.0 (82e1608df 2023-12-21) (from rustc 1.74.1 (a28077b28 2023-12-04))

Signed-off-by: Daniel Carl Jones <djonesoa@amazon.com>

* Simplify tuple ref mapping

Co-authored-by: Alessandro Passaro <alexpax@amazon.co.uk>
Signed-off-by: Daniel Carl Jones <djonesoa@amazon.com>

---------

Signed-off-by: Daniel Carl Jones <djonesoa@amazon.com>
Co-authored-by: Alessandro Passaro <alexpax@amazon.co.uk>
  • Loading branch information
dannycjones and passaro authored Jan 2, 2024
1 parent 83fa7c6 commit 374a0f2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions mountpoint-s3/src/inode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -711,14 +711,14 @@ impl SuperblockInner {

let found_directory = if result
.common_prefixes
.get(0)
.first()
.map(|prefix| prefix.starts_with(&full_path_suffixed))
.unwrap_or(false)
{
true
} else if result
.objects
.get(0)
.first()
.map(|object| object.key.starts_with(&full_path_suffixed))
.unwrap_or(false)
{
Expand Down
2 changes: 1 addition & 1 deletion mountpoint-s3/tests/reftests/reference.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ impl Reference {
pub fn new(remote_keys: Vec<(String, MockObject)>) -> Self {
let local_files = vec![];
let local_directories = vec![];
let materialized = build_reference(remote_keys.iter().map(|(k, o)| (k, o)));
let materialized = build_reference(remote_keys.iter().map(|(k, o): &(_, _)| (k, o)));
Self {
remote_keys: remote_keys.into_iter().collect(),
local_files,
Expand Down

0 comments on commit 374a0f2

Please sign in to comment.