lexical_write_float/
index.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//! Wrapper around indexing for opt-in, additional safety.
//!
//! By default, writers tend to be safe, due to Miri, Valgrind,
//! and other tests and careful validation against a wide range
//! of randomized input. Parsers are much trickier to validate.

#![cfg_attr(feature = "compact", allow(unused_macros))]
#![doc(hidden)]

/// Index a buffer, without bounds checking.
macro_rules! index_unchecked {
    ($x:ident[$i:expr]) => {
        *$x.get_unchecked($i)
    };
}