summaryrefslogtreecommitdiff
path: root/src/componentparameter.rs
diff options
context:
space:
mode:
authortroido <troido@protonmail.com>2020-02-09 23:54:24 +0100
committertroido <troido@protonmail.com>2020-02-09 23:54:24 +0100
commitb0e665f5436e08e4fd7446a59b87ac28f562a601 (patch)
treefcdeee5178606eadfe1e1b5744410bfd4fef260a /src/componentparameter.rs
parentb9cfb78c20fd309929aae98f24acc8ba4a9a7481 (diff)
refactoring using cargo clippy
Diffstat (limited to 'src/componentparameter.rs')
-rw-r--r--src/componentparameter.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/componentparameter.rs b/src/componentparameter.rs
index e6e0062..a76f243 100644
--- a/src/componentparameter.rs
+++ b/src/componentparameter.rs
@@ -62,7 +62,7 @@ impl ComponentParameter {
}
}
- pub fn get_type(&self, arguments: &Vec<(String, ParameterType, Option<Parameter>)>) -> Result<ParameterType, &'static str>{
+ pub fn get_type(&self, arguments: &[(String, ParameterType, Option<Parameter>)]) -> Result<ParameterType, &'static str>{
Ok(match self {
Self::Constant(param) => param.paramtype(),
Self::Argument(argname) => arguments.iter().find(|(n, _t, _d)| n == argname).ok_or("unknown argument name")?.1,