From acf995d7dae2ec8eb2ec445269e5d6172e955c53 Mon Sep 17 00:00:00 2001 From: Astro Date: Fri, 31 May 2019 00:19:20 +0200 Subject: [PATCH] soft_reset: rm unreachable! --- src/main.rs | 2 +- src/slcr.rs | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/main.rs b/src/main.rs index 9a46a96..e60334e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -95,7 +95,7 @@ fn panic(info: &core::panic::PanicInfo) -> ! { while !uart.tx_fifo_empty() {} slcr::RegisterBlock::unlocked(|slcr| slcr.soft_reset()); - unreachable!() + loop {} } #[no_mangle] diff --git a/src/slcr.rs b/src/slcr.rs index e88e6d3..22f4442 100644 --- a/src/slcr.rs +++ b/src/slcr.rs @@ -209,13 +209,11 @@ impl RegisterBlock { } /// Perform a soft reset - pub fn soft_reset(&mut self) -> ! { + pub fn soft_reset(&mut self) { self.pss_rst_ctrl.write( PssRstCtrl::zeroed() .soft_rst(true) ); - - unreachable!() } }