Skip to main content

i64_digits

Function i64_digits 

Source
pub fn i64_digits(buf: &mut [u8; 21], n: i64) -> &[u8] 
Expand description

The decimal digits of n, written into the back of buf.

The same answer push_i64 gives, for a caller that has nowhere to put a Vec. SSCAN key 0 MATCH 1* has to run a glob over a member that is stored as a number and has no digits anywhere, and doing that through a Vec would be an allocation per member on a thread that must not allocate.