We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ef5a96c commit 91da0b2Copy full SHA for 91da0b2
2 files changed
src/structures/paging/frame.rs
@@ -163,6 +163,15 @@ impl<S: PageSize> Iterator for PhysFrameRange<S> {
163
None
164
}
165
166
+
167
+ #[inline]
168
+ fn count(self) -> usize {
169
+ if !self.is_empty() {
170
+ ((self.end.start_address() - self.start.start_address()) / S::SIZE) as usize
171
+ } else {
172
+ 0
173
+ }
174
175
176
177
impl<S: PageSize> fmt::Debug for PhysFrameRange<S> {
src/structures/paging/page.rs
@@ -296,6 +296,15 @@ impl<S: PageSize> Iterator for PageRange<S> {
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
impl PageRange<Size2MiB> {
0 commit comments