lexical_write_float/
index.rs

1//! Wrapper around indexing for opt-in, additional safety.
2//!
3//! By default, writers tend to be safe, due to Miri, Valgrind,
4//! and other tests and careful validation against a wide range
5//! of randomized input. Parsers are much trickier to validate.
6
7#![cfg_attr(feature = "compact", allow(unused_macros))]
8#![doc(hidden)]
9
10/// Index a buffer, without bounds checking.
11macro_rules! index_unchecked {
12    ($x:ident[$i:expr]) => {
13        *$x.get_unchecked($i)
14    };
15}