Skip to content

Commit 997a1ef

Browse files
committed
Change value of ConversionFlag to i8 and None to -1
1 parent 851ce8a commit 997a1ef

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

core/src/format.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
/// Transforms a value prior to formatting it.
22
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
3-
#[repr(u8)]
3+
#[repr(i8)]
44
pub enum ConversionFlag {
55
/// No conversion
6-
None = 0, // CPython uses -1 but not pleasure for us
6+
None = -1, // CPython uses -1
77
/// Converts by calling `str(<value>)`.
8-
Str = b's',
8+
Str = b's' as i8,
99
/// Converts by calling `ascii(<value>)`.
10-
Ascii = b'a',
10+
Ascii = b'a' as i8,
1111
/// Converts by calling `repr(<value>)`.
12-
Repr = b'r',
12+
Repr = b'r' as i8,
1313
}

0 commit comments

Comments
 (0)