diff options
author | Griffin Smith <root@gws.fyi> | 2019-07-29T15·46-0400 |
---|---|---|
committer | Griffin Smith <root@gws.fyi> | 2019-08-03T16·41-0400 |
commit | 7138d9a0b627b64f31558f0f4820dec7e55fdee4 (patch) | |
tree | a6ea851cdd647cf4cd881dfa62f761b6fdf43cb8 /src/description.rs | |
parent | 9db5fad2f900732d59f9714ac4517952d26506d7 (diff) |
Add clippy to circleCI and fix all lints
Diffstat (limited to 'src/description.rs')
-rw-r--r-- | src/description.rs | 4 |
1 files changed, 2 insertions, 2 deletions
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>) -> 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>) -> String { buf } -pub fn describe_list<A: Describe>(lst: &Vec<A>) -> String { +pub fn describe_list<A: Describe>(lst: &[A]) -> String { list_to_sentence( &lst.iter().map(|e| e.description()).collect::<Vec<String>>(), ) |