mirror of
https://github.com/BurntSushi/ripgrep.git
synced 2025-04-02 20:45:38 +02:00
printer: remove unnecessary mut
This commit is contained in:
parent
03bf37ff4a
commit
36b276c6d0
@ -1029,7 +1029,7 @@ impl<'a, M: Matcher, W: WriteColor> StandardImpl<'a, M, W> {
|
||||
let mut count = 0;
|
||||
let mut stepper = LineStep::new(line_term, 0, bytes.len());
|
||||
while let Some((start, end)) = stepper.next(bytes) {
|
||||
let mut line = Match::new(start, end);
|
||||
let line = Match::new(start, end);
|
||||
self.write_prelude(
|
||||
self.sunk.absolute_byte_offset() + line.start() as u64,
|
||||
self.sunk.line_number().map(|n| n + count),
|
||||
@ -1105,7 +1105,6 @@ impl<'a, M: Matcher, W: WriteColor> StandardImpl<'a, M, W> {
|
||||
let spec = self.config().colors.matched();
|
||||
let bytes = self.sunk.bytes();
|
||||
for &m in self.sunk.matches() {
|
||||
let mut m = m;
|
||||
let mut count = 0;
|
||||
let mut stepper = LineStep::new(line_term, 0, bytes.len());
|
||||
while let Some((start, end)) = stepper.next(bytes) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user