diff options
author | Matthias Beyer <matthias.beyer@ifm.com> | 2022-07-06 11:38:50 +0200 |
---|---|---|
committer | Matthias Beyer <matthias.beyer@ifm.com> | 2022-07-06 11:38:50 +0200 |
commit | 9ccef6681387d9175f40dcecc33ec414e1627b8f (patch) | |
tree | ecbe490a1a303385d56a656d8af5ec97b38875db /crates/core/tedge_core | |
parent | 7f9b173df170dfedabc0af839675268c9bad5f9e (diff) |
Replace iter-clone-collect pattern
Fixes lint: clippy::iter_cloned_collect
Signed-off-by: Matthias Beyer <matthias.beyer@ifm.com>
Diffstat (limited to 'crates/core/tedge_core')
-rw-r--r-- | crates/core/tedge_core/src/reactor.rs | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/crates/core/tedge_core/src/reactor.rs b/crates/core/tedge_core/src/reactor.rs index 5cc99fef..f3c8ea74 100644 --- a/crates/core/tedge_core/src/reactor.rs +++ b/crates/core/tedge_core/src/reactor.rs @@ -4,7 +4,6 @@ use std::sync::Arc; use futures::StreamExt; use itertools::Itertools; -use tedge_api::message::MessageType; use tedge_api::plugin::BuiltPlugin; use tedge_api::PluginExt; use tokio::sync::mpsc::channel; @@ -79,13 +78,7 @@ impl Reactor { .0 .plugin_builders() .get(pconfig.kind().as_ref()) - .map(|(handle_types, _)| { - handle_types - .get_types() - .iter() - .cloned() - .collect::<Vec<MessageType>>() - }) + .map(|(handle_types, _)| handle_types.get_types().to_vec()) .ok_or_else(|| { PluginInstantiationError::KindNotFound(PluginKindUnknownError { name: pconfig.kind().as_ref().to_string(), |