Fix a new clippy lint
This commit is contained in:
parent
e35b45a792
commit
86f539d1f6
@ -231,13 +231,13 @@ impl<'a> ArtistOverlay<'a> {
|
||||
let indent = format!("\n{item_indent}");
|
||||
let list = vec
|
||||
.iter()
|
||||
.map(|(k, v)| format!("{k}: {}", Self::vec_to_string(v, list_indent)))
|
||||
.map(|(k, v)| format!("{k}: {}", Self::slice_to_string(v, list_indent)))
|
||||
.collect::<Vec<String>>()
|
||||
.join(&indent);
|
||||
format!("{indent}{list}")
|
||||
}
|
||||
|
||||
fn vec_to_string<S: AsRef<str>>(vec: &Vec<S>, indent: &str) -> String {
|
||||
fn slice_to_string<S: AsRef<str>>(vec: &[S], indent: &str) -> String {
|
||||
if vec.len() < 2 {
|
||||
vec.first()
|
||||
.map(|item| item.as_ref())
|
||||
|
Loading…
Reference in New Issue
Block a user