File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -80,7 +80,7 @@ impl<S: PageSize> Add<u64> for PhysFrame<S> {
8080
8181impl < S : PageSize > AddAssign < u64 > for PhysFrame < S > {
8282 fn add_assign ( & mut self , rhs : u64 ) {
83- * self = self . clone ( ) + rhs;
83+ * self = * self + rhs;
8484 }
8585}
8686
@@ -93,7 +93,7 @@ impl<S: PageSize> Sub<u64> for PhysFrame<S> {
9393
9494impl < S : PageSize > SubAssign < u64 > for PhysFrame < S > {
9595 fn sub_assign ( & mut self , rhs : u64 ) {
96- * self = self . clone ( ) - rhs;
96+ * self = * self - rhs;
9797 }
9898}
9999
@@ -127,7 +127,7 @@ impl<S: PageSize> Iterator for PhysFrameRange<S> {
127127
128128 fn next ( & mut self ) -> Option < Self :: Item > {
129129 if self . start < self . end {
130- let frame = self . start . clone ( ) ;
130+ let frame = self . start ;
131131 self . start += 1 ;
132132 Some ( frame)
133133 } else {
@@ -168,7 +168,7 @@ impl<S: PageSize> Iterator for PhysFrameRangeInclusive<S> {
168168
169169 fn next ( & mut self ) -> Option < Self :: Item > {
170170 if self . start <= self . end {
171- let frame = self . start . clone ( ) ;
171+ let frame = self . start ;
172172 self . start += 1 ;
173173 Some ( frame)
174174 } else {
Original file line number Diff line number Diff line change @@ -212,7 +212,7 @@ impl<S: PageSize> Add<u64> for Page<S> {
212212
213213impl < S : PageSize > AddAssign < u64 > for Page < S > {
214214 fn add_assign ( & mut self , rhs : u64 ) {
215- * self = self . clone ( ) + rhs;
215+ * self = * self + rhs;
216216 }
217217}
218218
@@ -225,7 +225,7 @@ impl<S: PageSize> Sub<u64> for Page<S> {
225225
226226impl < S : PageSize > SubAssign < u64 > for Page < S > {
227227 fn sub_assign ( & mut self , rhs : u64 ) {
228- * self = self . clone ( ) - rhs;
228+ * self = * self - rhs;
229229 }
230230}
231231
@@ -258,7 +258,7 @@ impl<S: PageSize> Iterator for PageRange<S> {
258258
259259 fn next ( & mut self ) -> Option < Self :: Item > {
260260 if self . start < self . end {
261- let page = self . start . clone ( ) ;
261+ let page = self . start ;
262262 self . start += 1 ;
263263 Some ( page)
264264 } else {
@@ -309,7 +309,7 @@ impl<S: PageSize> Iterator for PageRangeInclusive<S> {
309309
310310 fn next ( & mut self ) -> Option < Self :: Item > {
311311 if self . start <= self . end {
312- let page = self . start . clone ( ) ;
312+ let page = self . start ;
313313 self . start += 1 ;
314314 Some ( page)
315315 } else {
You can’t perform that action at this time.
0 commit comments