dbg_unreachable 0.1.2

Switch between unreachable! and unreachable_unchecked with a single macro
Documentation
  • Coverage
  • 50%
    1 out of 2 items documented1 out of 2 items with examples
  • Size
  • Source code size: 4.09 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 71.31 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 8s Average build duration of successful builds.
  • all releases: 8s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Repository
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • saulvaldelvira

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.