diff options
Diffstat (limited to 'src/peripheral/scb.rs')
-rw-r--r-- | src/peripheral/scb.rs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/peripheral/scb.rs b/src/peripheral/scb.rs index f4dfa52..98434e5 100644 --- a/src/peripheral/scb.rs +++ b/src/peripheral/scb.rs @@ -230,8 +230,8 @@ impl Exception { /// Returns the IRQ number of this `Exception` /// /// The return value is always within the closed range `[-1, -14]` - pub fn irqn(&self) -> i8 { - match *self { + pub fn irqn(self) -> i8 { + match self { Exception::NonMaskableInt => -14, Exception::HardFault => -13, #[cfg(not(armv6m))] @@ -709,7 +709,6 @@ impl SCB { } /// System handlers, exceptions with configurable priority -#[allow(non_camel_case_types)] #[derive(Clone, Copy, Debug, Eq, PartialEq)] pub enum SystemHandler { // NonMaskableInt, // priority is fixed @@ -745,8 +744,8 @@ pub enum SystemHandler { } impl SystemHandler { - fn index(&self) -> u8 { - match *self { + fn index(self) -> u8 { + match self { #[cfg(not(armv6m))] SystemHandler::MemoryManagement => 4, #[cfg(not(armv6m))] |