Skip to content

Commit e1a3d7a

Browse files
bors[bot]mvirkkunen
andcommitted
Merge #147
147: Remove debug_assert from Peripherals::steal r=thejpster a=mvirkkunen This is the same change as rust-embedded/svd2rust#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 <[email protected]>
2 parents ddebec2 + c125b2e commit e1a3d7a

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

src/peripheral/mod.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,6 @@ impl Peripherals {
167167

168168
/// Unchecked version of `Peripherals::take`
169169
pub unsafe fn steal() -> Self {
170-
debug_assert!(!CORE_PERIPHERALS);
171-
172170
CORE_PERIPHERALS = true;
173171

174172
Peripherals {

0 commit comments

Comments
 (0)