Merge pull request #157 from striezel-stash/clippy-strikes-again

fix more causes of clippy warnings
This commit is contained in:
Tobias Bengtsson 2022-09-28 18:21:08 +02:00 committed by GitHub
commit 04dd0cc990
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -55,8 +55,8 @@ pub fn parser(input: ItemFn) -> Result<TokenStream> {
});
let registered_classes_impls = state
.classes
.iter()
.map(|(_, class)| generate_registered_class_impl(class))
.values()
.map(generate_registered_class_impl)
.collect::<Result<Vec<_>>>()?;
let describe_fn = generate_stubs(&state);
@ -363,7 +363,7 @@ impl Describe for crate::constant::Constant {
impl Describe for State {
fn describe(&self) -> TokenStream {
let functs = self.functions.iter().map(Describe::describe);
let classes = self.classes.iter().map(|(_, class)| class.describe());
let classes = self.classes.values().map(|class| class.describe());
let constants = self.constants.iter().map(Describe::describe);
quote! {