From 2a2751bf2ac4dc21841ba1b823769ad2978af94c Mon Sep 17 00:00:00 2001 From: Stephan Dilly Date: Thu, 2 Sep 2021 09:15:41 +0200 Subject: [PATCH] fix clippy nightly --- src/components/commit_details/details.rs | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/components/commit_details/details.rs b/src/components/commit_details/details.rs index a3243c87..336ed375 100644 --- a/src/components/commit_details/details.rs +++ b/src/components/commit_details/details.rs @@ -16,7 +16,6 @@ use asyncgit::{ CWD, }; use crossterm::event::Event; -use itertools::Itertools; use std::clone::Clone; use std::{borrow::Cow, cell::Cell}; use sync::CommitTags; @@ -219,19 +218,19 @@ impl DetailsComponent { ))); res.push(Spans::from( - self.tags - .iter() - .map(|tag| { + itertools::Itertools::intersperse( + self.tags.iter().map(|tag| { Span::styled( Cow::from(tag), self.theme.text(true, false), ) - }) - .intersperse(Span::styled( + }), + Span::styled( Cow::from(","), self.theme.text(true, false), - )) - .collect::>(), + ), + ) + .collect::>(), )); }