Change value of ConversionFlag to i8 and None to -1

This commit is contained in:
Jeong YunWon 2023-05-16 21:58:13 +09:00
parent e8391ee175
commit 3a8ca5ee3e

View file

@ -1,13 +1,13 @@
/// Transforms a value prior to formatting it.
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
#[repr(u8)]
#[repr(i8)]
pub enum ConversionFlag {
/// No conversion
None = 0, // CPython uses -1 but not pleasure for us
None = -1, // CPython uses -1
/// Converts by calling `str(<value>)`.
Str = b's',
Str = b's' as i8,
/// Converts by calling `ascii(<value>)`.
Ascii = b'a',
Ascii = b'a' as i8,
/// Converts by calling `repr(<value>)`.
Repr = b'r',
Repr = b'r' as i8,
}