rust-osdev / x86_64

Library to program x86_64 hardware.
https://docs.rs/x86_64
Apache License 2.0
778 stars 129 forks source link

Implement `core::iter::Step` for `PhysFrame` and `Page` #212

Open phil-opp opened 3 years ago

phil-opp commented 3 years ago

This will make it possible to use Rust's native range types instead of our custom PhysFrameRange, PageRange, etc types. Note that we still need to keep these old types as the Step trait is not stable yet.

phil-opp commented 3 years ago

I started the implementation in the step_trait branch. If someone wants to implement this, feel free to continue on top of that branch.

mental32 commented 3 years ago

I opened a somewhat related PR #224 that let's *Range types be constructed from Range<u64>.

I'll check out the step_trait branch and see if I can figure out the trait (TIL core::iter::Step exists!)