aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar bors[bot] <bors[bot]@users.noreply.github.com> 2019-06-15 13:23:02 +0000
committerGravatar bors[bot] <bors[bot]@users.noreply.github.com> 2019-06-15 13:23:02 +0000
commite1a3d7a4c7c0ce058c1d9193d1417142c8621fe9 (patch)
tree55e3a3aa4b6c40bea69d1d89d8c43a4007419bb6 /src
parentddebec2bd0544a0a6c377059390a454a8943e0a8 (diff)
parentc125b2e3f1b106ec6d838c0ac640802e74744c9d (diff)
downloadcortex-m-e1a3d7a4c7c0ce058c1d9193d1417142c8621fe9.tar.gz
cortex-m-e1a3d7a4c7c0ce058c1d9193d1417142c8621fe9.tar.zst
cortex-m-e1a3d7a4c7c0ce058c1d9193d1417142c8621fe9.zip
Merge #147
147: Remove debug_assert from Peripherals::steal r=thejpster a=mvirkkunen This is the same change as https://github.com/rust-embedded/svd2rust/pull/238, except for the one bit that isn't generated by svd2rust. There was a decent amount of discussion about this over at that issue, and to me it makes sense to change this here as well. It's `unsafe`, so let the user decide if they want to use it. Co-authored-by: Matti Virkkunen <mvirkkunen@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/peripheral/mod.rs2
1 files changed, 0 insertions, 2 deletions
diff --git a/src/peripheral/mod.rs b/src/peripheral/mod.rs
index 6aacb73..8d2bd3f 100644
--- a/src/peripheral/mod.rs
+++ b/src/peripheral/mod.rs
@@ -167,8 +167,6 @@ impl Peripherals {
/// Unchecked version of `Peripherals::take`
pub unsafe fn steal() -> Self {
- debug_assert!(!CORE_PERIPHERALS);
-
CORE_PERIPHERALS = true;
Peripherals {