From e36a1d4645db54baf199a98e75ac66841fdf393d Mon Sep 17 00:00:00 2001 From: nmlgc Date: Thu, 28 Jun 2018 13:19:50 +0200 Subject: [PATCH] Fix mutability warnings --- src/sequencematcher.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sequencematcher.rs b/src/sequencematcher.rs index 4444baf..1800ac7 100644 --- a/src/sequencematcher.rs +++ b/src/sequencematcher.rs @@ -347,12 +347,12 @@ impl<'a, T: ?Sized + Sequence> SequenceMatcher<'a, T> { } if codes.first().unwrap().tag == "equal" { - let mut opcode = codes.first_mut().unwrap(); + let opcode = codes.first_mut().unwrap(); opcode.first_start = max(opcode.first_start, opcode.first_end.saturating_sub(n)); opcode.second_start = max(opcode.second_start, opcode.second_end.saturating_sub(n)); } if codes.last().unwrap().tag == "equal" { - let mut opcode = codes.last_mut().unwrap(); + let opcode = codes.last_mut().unwrap(); opcode.first_end = min(opcode.first_start + n, opcode.first_end); opcode.second_end = min(opcode.second_start + n, opcode.second_end); }