Skip to content

Commit

Permalink
Remove unneeded into_iter call in Paging Implementation post
Browse files Browse the repository at this point in the history
  • Loading branch information
phil-opp committed Mar 14, 2019
1 parent 82256aa commit fc5fd7f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -869,7 +869,7 @@ pub fn init_frame_allocator(
// map each region to its address range
let addr_ranges = regions.map(|r| r.range.start_addr()..r.range.end_addr());
// transform to an iterator of frame start addresses
let frame_addresses = addr_ranges.flat_map(|r| r.into_iter().step_by(4096));
let frame_addresses = addr_ranges.flat_map(|r| r.step_by(4096));
// create `PhysFrame` types from the start addresses
let frames = frame_addresses.map(|addr| {
PhysFrame::containing_address(PhysAddr::new(addr))
Expand Down

0 comments on commit fc5fd7f

Please sign in to comment.