Skip to content

Commit

Permalink
Make linter happier
Browse files Browse the repository at this point in the history
  • Loading branch information
bbliem committed Mar 23, 2024
1 parent 33076d9 commit 798af10
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -156,14 +156,14 @@ fn replace_emoji_in_grapheme(grapheme: &str) -> String {

pub fn replace_emojis_in_str(s: &str) -> String {
let graphemes = s.graphemes(true);
graphemes.map(|x| replace_emoji_in_grapheme(x)).collect()
graphemes.map(replace_emoji_in_grapheme).collect()
}

pub fn replace_emojis_in_span<'a>(span: &mut Span<'a>) {
pub fn replace_emojis_in_span(span: &mut Span) {
span.content = Cow::Owned(replace_emojis_in_str(span.content.as_ref()))
}

pub fn replace_emojis_in_line<'a>(line: &mut Line<'a>) {
pub fn replace_emojis_in_line(line: &mut Line) {
for span in &mut line.spans {
replace_emojis_in_span(span);
}
Expand Down

0 comments on commit 798af10

Please sign in to comment.