Skip to content

clippy: iter_kv_map #6855

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 7, 2025
Merged

Conversation

steviez
Copy link

@steviez steviez commented Jul 7, 2025

Problem

Work for upgrading to Rust 1.88.0 - see #6850

Summary of Changes

This PR resolves violations of iter_kv_map such as below:
https://rust-lang.github.io/rust-clippy/master/#iter_kv_map

error: iterating on a map's keys
  --> accounts-db/src/ancestors.rs:49:19
   |
49 |         let vec = source.iter().map(|(slot, _)| *slot).collect::<Vec<_>>();
   |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `source.keys().map(|slot| *slot)`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_kv_map
   = note: `-D clippy::iter-kv-map` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::iter_kv_map)]`

@steviez steviez requested a review from a team as a code owner July 7, 2025 00:21
@steviez steviez force-pushed the rust_v1.88_clippy_iter_kv_map branch from b1a09f4 to e8a7ae7 Compare July 7, 2025 00:27
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.3%. Comparing base (ea9f28e) to head (e8a7ae7).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #6855   +/-   ##
=======================================
  Coverage    83.3%    83.3%           
=======================================
  Files         853      853           
  Lines      378267   378267           
=======================================
  Hits       315267   315267           
  Misses      63000    63000           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@steviez steviez requested a review from brooksprumo July 7, 2025 01:25
@steviez steviez merged commit f08aa4e into anza-xyz:master Jul 7, 2025
41 checks passed
@steviez steviez deleted the rust_v1.88_clippy_iter_kv_map branch July 7, 2025 18:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants