dbg_unreachable

Crates.iodbg_unreachable
lib.rsdbg_unreachable
version0.1.2
sourcesrc
created_at2024-07-11 12:31:14.354576
updated_at2024-07-11 13:07:23.701173
descriptionSwitch between unreachable! and unreachable_unchecked with a single macro
homepage
repositoryhttps://github.com/saulvaldelvira/dbg-unreachable
max_upload_size
id1299497
size4,097
Saúl (saulvaldelvira)

documentation

README

Debug Unreachable

This crate defines an unreachable! macro that is conditionally compiled depending on the build profile. If the build is debug , it translates to core::unreachable If the build is release, it translates to core::hint::unreachable_unchecked There are cases where unreachable_unchecked is faster that unreachable. This macro uses the unchecked version on release mode, but still checks on debug mode, allowing you to catch cases in which the unreachable code is reached.

Commit count: 2

cargo fmt