Skip to content

Commit ed9fb42

Browse files
authored
Merge pull request #175 from ecstatic-morse/patch-1
Don't rely on promotion of `PageTableEntry::new` inside a `const fn`
2 parents 768209b + ef3d5c0 commit ed9fb42

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Diff for: src/structures/paging/page_table.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -188,8 +188,9 @@ impl PageTable {
188188
#[cfg(feature = "const_fn")]
189189
#[inline]
190190
pub const fn new() -> Self {
191+
const EMPTY: PageTableEntry = PageTableEntry::new();
191192
PageTable {
192-
entries: [PageTableEntry::new(); ENTRY_COUNT],
193+
entries: [EMPTY; ENTRY_COUNT],
193194
}
194195
}
195196

0 commit comments

Comments
 (0)