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> {
80
80
81
81
impl < S : PageSize > AddAssign < u64 > for PhysFrame < S > {
82
82
fn add_assign ( & mut self , rhs : u64 ) {
83
- * self = self . clone ( ) + rhs;
83
+ * self = * self + rhs;
84
84
}
85
85
}
86
86
@@ -93,7 +93,7 @@ impl<S: PageSize> Sub<u64> for PhysFrame<S> {
93
93
94
94
impl < S : PageSize > SubAssign < u64 > for PhysFrame < S > {
95
95
fn sub_assign ( & mut self , rhs : u64 ) {
96
- * self = self . clone ( ) - rhs;
96
+ * self = * self - rhs;
97
97
}
98
98
}
99
99
@@ -127,7 +127,7 @@ impl<S: PageSize> Iterator for PhysFrameRange<S> {
127
127
128
128
fn next ( & mut self ) -> Option < Self :: Item > {
129
129
if self . start < self . end {
130
- let frame = self . start . clone ( ) ;
130
+ let frame = self . start ;
131
131
self . start += 1 ;
132
132
Some ( frame)
133
133
} else {
@@ -168,7 +168,7 @@ impl<S: PageSize> Iterator for PhysFrameRangeInclusive<S> {
168
168
169
169
fn next ( & mut self ) -> Option < Self :: Item > {
170
170
if self . start <= self . end {
171
- let frame = self . start . clone ( ) ;
171
+ let frame = self . start ;
172
172
self . start += 1 ;
173
173
Some ( frame)
174
174
} else {
Original file line number Diff line number Diff line change @@ -212,7 +212,7 @@ impl<S: PageSize> Add<u64> for Page<S> {
212
212
213
213
impl < S : PageSize > AddAssign < u64 > for Page < S > {
214
214
fn add_assign ( & mut self , rhs : u64 ) {
215
- * self = self . clone ( ) + rhs;
215
+ * self = * self + rhs;
216
216
}
217
217
}
218
218
@@ -225,7 +225,7 @@ impl<S: PageSize> Sub<u64> for Page<S> {
225
225
226
226
impl < S : PageSize > SubAssign < u64 > for Page < S > {
227
227
fn sub_assign ( & mut self , rhs : u64 ) {
228
- * self = self . clone ( ) - rhs;
228
+ * self = * self - rhs;
229
229
}
230
230
}
231
231
@@ -258,7 +258,7 @@ impl<S: PageSize> Iterator for PageRange<S> {
258
258
259
259
fn next ( & mut self ) -> Option < Self :: Item > {
260
260
if self . start < self . end {
261
- let page = self . start . clone ( ) ;
261
+ let page = self . start ;
262
262
self . start += 1 ;
263
263
Some ( page)
264
264
} else {
@@ -309,7 +309,7 @@ impl<S: PageSize> Iterator for PageRangeInclusive<S> {
309
309
310
310
fn next ( & mut self ) -> Option < Self :: Item > {
311
311
if self . start <= self . end {
312
- let page = self . start . clone ( ) ;
312
+ let page = self . start ;
313
313
self . start += 1 ;
314
314
Some ( page)
315
315
} else {
You can’t perform that action at this time.
0 commit comments