@@ -1156,11 +1156,11 @@ impl<T: TrustedStep> RangeInclusiveIteratorImpl for ops::RangeInclusive<T> {
11561156 let is_iterating = self . start < self . end ;
11571157 Some ( if is_iterating {
11581158 // SAFETY: just checked precondition
1159- let n = unsafe { Step :: forward_unchecked ( self . start . clone ( ) , 1 ) } ;
1159+ let n = unsafe { Step :: forward_unchecked ( self . start , 1 ) } ;
11601160 mem:: replace ( & mut self . start , n)
11611161 } else {
11621162 self . exhausted = true ;
1163- self . start . clone ( )
1163+ self . start
11641164 } )
11651165 }
11661166
@@ -1179,15 +1179,15 @@ impl<T: TrustedStep> RangeInclusiveIteratorImpl for ops::RangeInclusive<T> {
11791179
11801180 while self . start < self . end {
11811181 // SAFETY: just checked precondition
1182- let n = unsafe { Step :: forward_unchecked ( self . start . clone ( ) , 1 ) } ;
1182+ let n = unsafe { Step :: forward_unchecked ( self . start , 1 ) } ;
11831183 let n = mem:: replace ( & mut self . start , n) ;
11841184 accum = f ( accum, n) ?;
11851185 }
11861186
11871187 self . exhausted = true ;
11881188
11891189 if self . start == self . end {
1190- accum = f ( accum, self . start . clone ( ) ) ?;
1190+ accum = f ( accum, self . start ) ?;
11911191 }
11921192
11931193 try { accum }
@@ -1201,11 +1201,11 @@ impl<T: TrustedStep> RangeInclusiveIteratorImpl for ops::RangeInclusive<T> {
12011201 let is_iterating = self . start < self . end ;
12021202 Some ( if is_iterating {
12031203 // SAFETY: just checked precondition
1204- let n = unsafe { Step :: backward_unchecked ( self . end . clone ( ) , 1 ) } ;
1204+ let n = unsafe { Step :: backward_unchecked ( self . end , 1 ) } ;
12051205 mem:: replace ( & mut self . end , n)
12061206 } else {
12071207 self . exhausted = true ;
1208- self . end . clone ( )
1208+ self . end
12091209 } )
12101210 }
12111211
@@ -1224,15 +1224,15 @@ impl<T: TrustedStep> RangeInclusiveIteratorImpl for ops::RangeInclusive<T> {
12241224
12251225 while self . start < self . end {
12261226 // SAFETY: just checked precondition
1227- let n = unsafe { Step :: backward_unchecked ( self . end . clone ( ) , 1 ) } ;
1227+ let n = unsafe { Step :: backward_unchecked ( self . end , 1 ) } ;
12281228 let n = mem:: replace ( & mut self . end , n) ;
12291229 accum = f ( accum, n) ?;
12301230 }
12311231
12321232 self . exhausted = true ;
12331233
12341234 if self . start == self . end {
1235- accum = f ( accum, self . start . clone ( ) ) ?;
1235+ accum = f ( accum, self . start ) ?;
12361236 }
12371237
12381238 try { accum }
0 commit comments