Skip to content

[rust] clippy::for_kv_map lint failures after Rust 1.97 stable release #3695

Description

@LiebingYu

Search before asking

  • I searched in the issues and found nothing similar.

Fluss version

0.9.0 (latest release)

Please describe the bug 🐞

https://github.com/apache/fluss/actions/runs/29680927031/job/88180922898#step:9:355

error: you seem to want to iterate on a map's values
   --> crates/fluss/src/client/write/accumulator.rs:883:40
    |
883 |             for (_bucket_id, deque) in entry.value_mut().batches.iter_mut() {
    |                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.97.0/index.html#for_kv_map
    = note: `-D clippy::for-kv-map` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::for_kv_map)]`
help: use the corresponding method
    |
883 -             for (_bucket_id, deque) in entry.value_mut().batches.iter_mut() {
883 +             for deque in entry.value_mut().batches.values_mut() {
    |

error: you seem to want to iterate on a map's values
   --> crates/fluss/src/client/write/accumulator.rs:934:37
    |
934 |             for (_, batch_deque) in entry.value().batches.iter() {
    |                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.97.0/index.html#for_kv_map
help: use the corresponding method
    |
934 -             for (_, batch_deque) in entry.value().batches.iter() {
934 +             for batch_deque in entry.value().batches.values() {
    |

Solution

No response

Are you willing to submit a PR?

  • I'm willing to submit a PR!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Fields

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions