From 938aec1c082d4cedb861616e5d9e98178331432c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1vid=20Istv=C3=A1n=20B=C3=ADr=C3=B3?= Date: Thu, 14 Nov 2024 11:53:58 +0100 Subject: [PATCH] clippy --- wasm-rpc-stubgen/src/commands/log.rs | 2 +- wasm-rpc-stubgen/src/model/wasm_rpc.rs | 7 +------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/wasm-rpc-stubgen/src/commands/log.rs b/wasm-rpc-stubgen/src/commands/log.rs index ff2e8e89..d30a26ad 100644 --- a/wasm-rpc-stubgen/src/commands/log.rs +++ b/wasm-rpc-stubgen/src/commands/log.rs @@ -205,7 +205,7 @@ pub trait LogColorize { impl<'a> LogColorize for &'a str { fn as_str(&self) -> impl Colorize { - self.as_ref() + *self } } diff --git a/wasm-rpc-stubgen/src/model/wasm_rpc.rs b/wasm-rpc-stubgen/src/model/wasm_rpc.rs index 5969660d..05453a6c 100644 --- a/wasm-rpc-stubgen/src/model/wasm_rpc.rs +++ b/wasm-rpc-stubgen/src/model/wasm_rpc.rs @@ -587,12 +587,7 @@ impl Application { pub fn all_wasm_rpc_dependencies(&self) -> BTreeSet { self.wasm_components_by_name .iter() - .flat_map(|(_, component)| { - component - .wasm_rpc_dependencies - .iter() - .map(|component_name| component_name.clone()) - }) + .flat_map(|(_, component)| component.wasm_rpc_dependencies.iter().cloned()) .collect() }