Skip to content
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

clippy: Remove identity map #2842

Closed
wants to merge 1 commit into from
Closed

Conversation

SUPERCILEX
Copy link
Contributor

No description provided.

@taiki-e
Copy link
Member

taiki-e commented Jan 6, 2024

It seems the warning is clippy false positive.

error[E0271]: type mismatch resolving `<Iter<'_, (&str, String)> as IntoIterator>::Item == (_, _)`
   --> examples/examples/sloggish/sloggish_collector.rs:233:45
    |
233 |                 self.print_kvs(&mut stderr, data.kvs.iter(), "").unwrap();
    |                      ---------              ^^^^^^^^^^^^^^^ expected `(_, _)`, found `&(&str, String)`
    |                      |
    |                      required by a bound introduced by this call
    |
    = note:  expected tuple `(_, _)`
            found reference `&(&str, String)`
note: the method call chain might not have had the expected associated types
   --> examples/examples/sloggish/sloggish_collector.rs:233:54
    |
233 |                 self.print_kvs(&mut stderr, data.kvs.iter(), "").unwrap();
    |                                             -------- ^^^^^^ `IntoIterator::Item` is `&(&str, String)` here
    |                                             |
    |                                             this expression has type `Vec<(&str, String)>`
note: required by a bound in `SloggishCollector::print_kvs`
   --> examples/examples/sloggish/sloggish_collector.rs:159:25
    |
152 |     fn print_kvs<'a, I, K, V>(
    |        --------- required by a bound in this associated function
...
159 |         I: IntoIterator<Item = (K, V)>,
    |                         ^^^^^^^^^^^^^ required by this bound in `SloggishCollector::print_kvs`

@SUPERCILEX
Copy link
Contributor Author

Hmmm, yeah. The weird thing is that I can't reproduce the clippy warning locally, so I don't know what's going on.

@SUPERCILEX SUPERCILEX closed this Jan 6, 2024
@SUPERCILEX SUPERCILEX deleted the patch-1 branch January 6, 2024 18:16
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.

2 participants