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

fix more causes of clippy warnings #157

Merged

Conversation

striezel
Copy link
Contributor

Clippy linting had more errors:

error: iterating on a map's values
Error:   --> crates/macros/src/module.rs:56:36
   |
56 |       let registered_classes_impls = state
   |  ____________________________________^
57 | |         .classes
58 | |         .iter()
59 | |         .map(|(_, class)| generate_registered_class_impl(class))
   | |________________________________________________________________^
   |
   = note: `-D clippy::iter-kv-map` implied by `-D warnings`
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_kv_map
help: try
   |
56 ~     let registered_classes_impls = state
57 +         .classes.values().map(|class| generate_registered_class_impl(class))
   |

error: iterating on a map's values
Error:    --> crates/macros/src/module.rs:366:23
    |
366 |         let classes = self.classes.iter().map(|(_, class)| class.describe());
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.classes.values().map(|class| class.describe())`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_kv_map

error: could not compile `ext-php-rs-derive` due to 2 previous errors

Clippy linting had more errors:

    error: iterating on a map's values
    Error:   --> crates/macros/src/module.rs:56:36
       |
    56 |       let registered_classes_impls = state
       |  ____________________________________^
    57 | |         .classes
    58 | |         .iter()
    59 | |         .map(|(_, class)| generate_registered_class_impl(class))
       | |________________________________________________________________^
       |
       = note: `-D clippy::iter-kv-map` implied by `-D warnings`
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_kv_map
    help: try
       |
    56 ~     let registered_classes_impls = state
    57 +         .classes.values().map(|class| generate_registered_class_impl(class))
       |

    error: iterating on a map's values
    Error:    --> crates/macros/src/module.rs:366:23
        |
    366 |         let classes = self.classes.iter().map(|(_, class)| class.describe());
        |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.classes.values().map(|class| class.describe())`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_kv_map

    error: could not compile `ext-php-rs-derive` due to 2 previous errors
@striezel striezel force-pushed the clippy-strikes-again branch from 8f77a12 to ee45e8d Compare September 28, 2022 10:34
@TobiasBengtsson TobiasBengtsson merged commit 04dd0cc into davidcole1340:master Sep 28, 2022
@TobiasBengtsson
Copy link
Collaborator

Thanks! 👍

@striezel striezel deleted the clippy-strikes-again branch September 28, 2022 17:13
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