Skip to content

Commit

Permalink
map isn't needed here
Browse files Browse the repository at this point in the history
  • Loading branch information
WalterScottYoung committed Nov 29, 2024
1 parent 79cbe89 commit 89630d4
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions crates/printer/src/standard.rs
Original file line number Diff line number Diff line change
Expand Up @@ -762,10 +762,8 @@ impl<'p, 's, M: Matcher, W: WriteColor> StandardSink<'p, 's, M, W> {
) -> io::Result<()> {
self.replacer.clear();
if self.standard.config.replacement.is_some() {
let replacement = (*self.standard.config.replacement)
.as_ref()
.map(|r| &*r)
.unwrap();
let replacement =
(*self.standard.config.replacement).as_ref().unwrap();
self.replacer.replace_all(
searcher,
&self.matcher,
Expand Down

0 comments on commit 89630d4

Please sign in to comment.