mirror of
https://github.com/BurntSushi/ripgrep.git
synced 2025-08-04 18:18:17 +00:00
map isn't needed here
This commit is contained in:
parent
79cbe89deb
commit
89630d4a57
1 changed files with 2 additions and 4 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue