Skip to content

Commit 2bf000a

Browse files
committed
1 parent 57c190d commit 2bf000a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

crates/core/search.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -389,15 +389,15 @@ fn search_path<M: Matcher, W: WriteColor>(
389389
searcher.search_path(&matcher, path, &mut sink)?;
390390
Ok(SearchResult {
391391
has_match: sink.has_match(),
392-
stats: sink.stats().map(|s| s.clone()),
392+
stats: sink.stats().cloned(),
393393
})
394394
}
395395
Printer::Summary(ref mut p) => {
396396
let mut sink = p.sink_with_path(&matcher, path);
397397
searcher.search_path(&matcher, path, &mut sink)?;
398398
Ok(SearchResult {
399399
has_match: sink.has_match(),
400-
stats: sink.stats().map(|s| s.clone()),
400+
stats: sink.stats().cloned(),
401401
})
402402
}
403403
Printer::JSON(ref mut p) => {
@@ -426,15 +426,15 @@ fn search_reader<M: Matcher, R: io::Read, W: WriteColor>(
426426
searcher.search_reader(&matcher, &mut rdr, &mut sink)?;
427427
Ok(SearchResult {
428428
has_match: sink.has_match(),
429-
stats: sink.stats().map(|s| s.clone()),
429+
stats: sink.stats().cloned(),
430430
})
431431
}
432432
Printer::Summary(ref mut p) => {
433433
let mut sink = p.sink_with_path(&matcher, path);
434434
searcher.search_reader(&matcher, &mut rdr, &mut sink)?;
435435
Ok(SearchResult {
436436
has_match: sink.has_match(),
437-
stats: sink.stats().map(|s| s.clone()),
437+
stats: sink.stats().cloned(),
438438
})
439439
}
440440
Printer::JSON(ref mut p) => {

0 commit comments

Comments
 (0)