Skip to content

Commit

Permalink
rewrite clear.color
Browse files Browse the repository at this point in the history
  • Loading branch information
kolapapa committed Apr 24, 2022
1 parent 95f44fd commit 2a03ebd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -363,8 +363,8 @@ impl Clear {
}

pub fn color(&self, content: &[u8]) -> Vec<u8> {
let empty: &[u8] = &[];
let tmp = self.color_re.replace_all(content, empty);
tmp.into_owned()
self.color_re
.replace_all(content, &[] as &[u8])
.into_owned()
}
}

0 comments on commit 2a03ebd

Please sign in to comment.