diff options
author | Andrew Gallant <jamslam@gmail.com> | 2019-04-24 17:22:27 -0400 |
---|---|---|
committer | Andrew Gallant <jamslam@gmail.com> | 2019-04-24 17:22:27 -0400 |
commit | 36b276c6d0e6e8e84a7d74cfda7933ba714e88a0 (patch) | |
tree | 8cb9e6b4e542fb7c8cff2bfc0c7f1f6643564fd0 | |
parent | 03bf37ff4a29361c47843369f7d3dc5689b8fdac (diff) |
printer: remove unnecessary mut
-rw-r--r-- | grep-printer/src/standard.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/grep-printer/src/standard.rs b/grep-printer/src/standard.rs index b568c31b..92fae5ca 100644 --- a/grep-printer/src/standard.rs +++ b/grep-printer/src/standard.rs @@ -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) { |