Skip to content

Commit 9a062df

Browse files
authored
Merge pull request #488 from Freax13/fix_indentation
fix warnings
2 parents 5aff621 + a98580e commit 9a062df

File tree

2 files changed

+13
-15
lines changed

2 files changed

+13
-15
lines changed

src/registers/model_specific.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -357,11 +357,11 @@ mod x86_64 {
357357
///
358358
/// # Returns
359359
/// - Field 1 (SYSRET): The CS selector is set to this field + 16. SS.Sel is set to
360-
/// this field + 8. Because SYSRET always returns to CPL 3, the
361-
/// RPL bits 1:0 should be initialized to 11b.
360+
/// this field + 8. Because SYSRET always returns to CPL 3, the
361+
/// RPL bits 1:0 should be initialized to 11b.
362362
/// - Field 2 (SYSCALL): This field is copied directly into CS.Sel. SS.Sel is set to
363-
/// this field + 8. Because SYSCALL always switches to CPL 0, the RPL bits
364-
/// 33:32 should be initialized to 00b.
363+
/// this field + 8. Because SYSCALL always switches to CPL 0, the RPL bits
364+
/// 33:32 should be initialized to 00b.
365365
#[inline]
366366
pub fn read_raw() -> (u16, u16) {
367367
let msr_value = unsafe { Self::MSR.read() };
@@ -398,11 +398,11 @@ mod x86_64 {
398398
///
399399
/// # Parameters
400400
/// - sysret: The CS selector is set to this field + 16. SS.Sel is set to
401-
/// this field + 8. Because SYSRET always returns to CPL 3, the
402-
/// RPL bits 1:0 should be initialized to 11b.
401+
/// this field + 8. Because SYSRET always returns to CPL 3, the
402+
/// RPL bits 1:0 should be initialized to 11b.
403403
/// - syscall: This field is copied directly into CS.Sel. SS.Sel is set to
404-
/// this field + 8. Because SYSCALL always switches to CPL 0, the RPL bits
405-
/// 33:32 should be initialized to 00b.
404+
/// this field + 8. Because SYSCALL always switches to CPL 0, the RPL bits
405+
/// 33:32 should be initialized to 00b.
406406
///
407407
/// # Safety
408408
///

src/structures/idt.rs

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -153,9 +153,9 @@ pub struct InterruptDescriptorTable {
153153
/// is enabled.
154154
/// - Execution of any legacy SSE instruction when `CR4.OSFXSR` is cleared to 0.
155155
/// - Execution of any SSE instruction (uses `YMM`/`XMM` registers), or 64-bit media
156-
/// instruction (uses `MMXTM` registers) when `CR0.EM` = 1.
156+
/// instruction (uses `MMXTM` registers) when `CR0.EM` = 1.
157157
/// - Execution of any SSE floating-point instruction (uses `YMM`/`XMM` registers) that
158-
/// causes a numeric exception when `CR4.OSXMMEXCPT` = 0.
158+
/// causes a numeric exception when `CR4.OSXMMEXCPT` = 0.
159159
/// - Use of the `DR4` or `DR5` debug registers when `CR4.DE` = 1.
160160
/// - Execution of `RSM` when not in `SMM` mode.
161161
///
@@ -503,7 +503,7 @@ impl InterruptDescriptorTable {
503503
///
504504
/// - `self` is never destroyed.
505505
/// - `self` always stays at the same memory location. It is recommended to wrap it in
506-
/// a `Box`.
506+
/// a `Box`.
507507
///
508508
#[cfg(all(feature = "instructions", target_arch = "x86_64"))]
509509
#[inline]
@@ -1642,7 +1642,7 @@ mod test {
16421642

16431643
#[test]
16441644
fn entry_derive_test() {
1645-
fn foo(_: impl Clone + Copy + PartialEq + fmt::Debug) {}
1645+
fn foo(_: impl Copy + PartialEq + fmt::Debug) {}
16461646

16471647
foo(Entry::<HandlerFuncWithErrCode> {
16481648
pointer_low: 0,
@@ -1667,9 +1667,7 @@ mod test {
16671667
});
16681668

16691669
unsafe {
1670-
frame
1671-
.as_mut()
1672-
.update(|f| f.instruction_pointer = f.instruction_pointer + 2u64);
1670+
frame.as_mut().update(|f| f.instruction_pointer += 2u64);
16731671
}
16741672
}
16751673
}

0 commit comments

Comments
 (0)