From b0e665f5436e08e4fd7446a59b87ac28f562a601 Mon Sep 17 00:00:00 2001 From: troido Date: Sun, 9 Feb 2020 23:54:24 +0100 Subject: refactoring using cargo clippy --- src/componentparameter.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/componentparameter.rs') 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)>) -> Result{ + pub fn get_type(&self, arguments: &[(String, ParameterType, Option)]) -> Result{ 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, -- cgit