We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
impl fmt::Debug for EntryOptions
1 parent 7f4d2bb commit 8e030f8Copy full SHA for 8e030f8
src/structures/idt.rs
@@ -1002,8 +1002,8 @@ impl EntryOptions {
1002
self
1003
}
1004
1005
- fn stack_index(&self) -> u16 {
1006
- self.bits.get_bits(0..3) - 1
+ fn stack_index(&self) -> Option<u16> {
+ self.bits.get_bits(0..3).checked_sub(1)
1007
1008
1009
@@ -1720,6 +1720,11 @@ mod test {
1720
1721
1722
1723
+ #[test]
1724
+ fn idt_fmt_debug() {
1725
+ dbg!(InterruptDescriptorTable::new());
1726
+ }
1727
+
1728
#[test]
1729
fn entry_derive_test() {
1730
fn foo(_: impl Copy + PartialEq + fmt::Debug) {}
0 commit comments