From 7138d9a0b627b64f31558f0f4820dec7e55fdee4 Mon Sep 17 00:00:00 2001 From: Griffin Smith Date: Mon, 29 Jul 2019 11:46:01 -0400 Subject: Add clippy to circleCI and fix all lints --- src/description.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/description.rs') diff --git a/src/description.rs b/src/description.rs index 4c553c746d91..31f39f7578c2 100644 --- a/src/description.rs +++ b/src/description.rs @@ -1,6 +1,6 @@ use crate::entities::Describe; -pub fn list_to_sentence(lst: &Vec) -> String { +pub fn list_to_sentence(lst: &[String]) -> String { let mut buf = String::with_capacity( lst.iter() .map(|e| e.len() + 2usize /* ", " */) @@ -33,7 +33,7 @@ pub fn list_to_sentence(lst: &Vec) -> String { buf } -pub fn describe_list(lst: &Vec) -> String { +pub fn describe_list(lst: &[A]) -> String { list_to_sentence( &lst.iter().map(|e| e.description()).collect::>(), ) -- cgit 1.4.1