Skip to content

Commit f411496

Browse files
committed
gdt: Update comments and assert message
Signed-off-by: Joe Richey <[email protected]>
1 parent 8c3f123 commit f411496

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/structures/gdt.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ impl<const MAX: usize> GlobalDescriptorTable<MAX> {
7575
/// # Safety
7676
///
7777
/// * The user must make sure that the entries are well formed
78-
/// * The provided slice **must not be larger than 8 items** (only up to the first 8 will be observed.)
78+
/// * Panics if the provided slice has more than `MAX` entries
7979
#[inline]
8080
pub const unsafe fn from_raw_slice(slice: &[u64]) -> Self {
8181
let next_free = slice.len();
@@ -84,7 +84,7 @@ impl<const MAX: usize> GlobalDescriptorTable<MAX> {
8484

8585
assert!(
8686
next_free <= MAX,
87-
"initializing a GDT from a slice requires it to be **at most** 8 elements."
87+
"cannot initialize GDT with slice exceeding the maximum length"
8888
);
8989

9090
while idx != next_free {

0 commit comments

Comments
 (0)