Skip to content

Commit

Permalink
refactor: remove unnecessary clones
Browse files Browse the repository at this point in the history
  • Loading branch information
tomcur committed Jul 17, 2024
1 parent d14a8d4 commit 8b5624f
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions src/configuration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,17 +72,16 @@ impl Highlight<'_> {
#[rustfmt::skip]
pub fn gui_styles_iter(&self) -> impl Iterator<Item = &'static str> {
self.bold
.clone()
.into_iter()
.map(|_| "bold")
.chain(self.italic.clone().into_iter().map(|_| "italic"))
.chain(self.undercurl.clone().into_iter().map(|_| "undercurl"))
.chain(self.underdouble.clone().into_iter().map(|_| "underdouble"))
.chain(self.underdashed.clone().into_iter().map(|_| "underdashed"))
.chain(self.underdotted.clone().into_iter().map(|_| "underdotted"))
.chain(self.strikethrough.clone().into_iter().map(|_| "strikethrough"))
.chain(self.reverse.clone().into_iter().map(|_| "reverse"))
.chain(self.nocombine.clone().into_iter().map(|_| "nocombine"))
.chain(self.italic.into_iter().map(|_| "italic"))
.chain(self.undercurl.into_iter().map(|_| "undercurl"))
.chain(self.underdouble.into_iter().map(|_| "underdouble"))
.chain(self.underdashed.into_iter().map(|_| "underdashed"))
.chain(self.underdotted.into_iter().map(|_| "underdotted"))
.chain(self.strikethrough.into_iter().map(|_| "strikethrough"))
.chain(self.reverse.into_iter().map(|_| "reverse"))
.chain(self.nocombine.into_iter().map(|_| "nocombine"))
}
}

Expand Down

0 comments on commit 8b5624f

Please sign in to comment.