We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 73a051e commit 4fb47e4Copy full SHA for 4fb47e4
2 files changed
src/structures/paging/frame.rs
@@ -161,6 +161,15 @@ impl<S: PageSize> Iterator for PhysFrameRange<S> {
161
None
162
}
163
164
+
165
+ #[inline]
166
+ fn count(self) -> usize {
167
+ if !self.is_empty() {
168
+ ((self.end.start_address() - self.start.start_address()) / S::SIZE) as usize
169
+ } else {
170
+ 0
171
+ }
172
173
174
175
impl<S: PageSize> fmt::Debug for PhysFrameRange<S> {
src/structures/paging/page.rs
@@ -324,6 +324,15 @@ impl<S: PageSize> Iterator for PageRange<S> {
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
impl PageRange<Size2MiB> {
0 commit comments